OSDN Git Service

86th Cygnus<->FSF quick merge
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 Mon Apr 29 15:38:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
2
3         * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
4         (import_export_decl): Ditto.
5         (finish_prevtable_vardecl): Disable vtable hack if
6         SUPPORTS_ONE_ONLY > 1.
7
8 Mon Apr 29 14:32:47 1996  Mike Stump  <mrs@cygnus.com>
9
10         * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
11         PREDECREMENT_EXPRs take two arguments, not one.
12
13 Mon Apr 29 00:27:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
14
15         * class.c (build_vtable_entry): Don't build thunks for abstract
16         virtuals.
17
18         * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
19         frontend.
20
21 Sat Apr 27 16:45:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
22
23         * class.c (set_rtti_entry): Use size_zero_node.
24         (build_vtable): Ditto.
25
26 Sat Apr 27 14:48:57 1996  Jason Merrill  <jason@phydeaux.cygnus.com>
27
28         * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
29         (prepare_fresh_vtable): Ditto.
30
31 Fri Apr 26 13:14:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
32
33         * method.c (emit_thunk): Call mark_used on the target function.
34
35         * call.c (build_method_call): Don't warn about pending templates.
36
37 Thu Apr 25 14:55:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
38
39         * decl2.c (finish_file): Fix list walking logic.
40
41         * typeck2.c (check_for_new_type): Only warn if -pedantic.
42
43 Wed Apr 24 15:41:15 1996  Bob Manson  <manson@charmed.cygnus.com>
44
45         * class.c (finish_struct_1): Remove old code for
46         dont_allow_type_definitions.
47         * cp-tree.h: Ditto.
48         * spew.c: Make sure cp-tree.h is included before parse.h, so the
49         definition of flagged_type_tree is found before it is used.
50         * lex.c: Ditto.
51         * parse.y: Added the ftype member to the type union, and changed a
52         number of rules to use it instead of ttype. Added calls to
53         check_for_new_type() as appropriate.
54         * typeck2.c (check_for_new_type): New function for checking
55         if a newly defined type appears in the specified tree.
56         * cp-tree.h: Add new type flagged_type_tree. Add a prototype
57         for check_for_new_type().
58
59 Wed Apr 24 00:36:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
60
61         * decl2.c (finish_file): Only use a sentry if the decl is public.
62
63         * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
64         don't pass LOOKUP_ONLYCONVERTING.
65
66 Tue Apr 23 17:18:47 1996  Bob Manson  <manson@charmed.cygnus.com>
67
68         * typeck.c (common_type): Fix the ARRAY_TYPE case so it
69         properly keeps track of const and volatile type modifiers.
70
71 Tue Apr 23 10:52:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
72
73         * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
74         * pt.c (comp_template_args): Use it.
75
76         * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
77         assemble_external for artificial function decls.
78
79         * decl.c (cp_finish_decl): Oops.
80
81 Mon Apr 22 17:28:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
82
83         * decl2.c (import_export_decl): Put static data member templates
84         into common storage, or make them weak, depending on whether they
85         are dynamically or statically initialized.
86         (get_sentry): New function.
87         (finish_file): Do import_export_decl for static data members before
88         building the init/fini functions.  Don't init/fini a variable that's
89         EXTERNAL.  Use a sentry for variables in common.  Fix mismatching
90         push/pop_temp_slots.
91         * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
92         expand_static_init thang.
93         * method.c (get_id_2): New function.
94
95 Mon Apr 22 15:32:45 1996  Bob Manson  <manson@charmed.cygnus.com>
96
97         * parse.y (empty_parms): Make sure we use C++-style prototypes
98         when we're declaring member functions.
99
100 Sun Apr 21 10:08:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
101
102         * Makefile.in (CONFLICTS): 16 s/r conflicts.
103         * parse.y (self_template_type): New nonterminal.
104
105 Thu Apr 18 08:56:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
106
107         * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
108         name.
109         * parse.y (base_class.1): Allow 'typename foo::bar'.
110
111         * lex.c (check_newline): Remove #pragma code that plays with the
112         input stream, since we now deal with tokens.  Clear nextchar when
113         we're done.
114         (handle_cp_pragma): Use real_yylex.
115         (handle_sysv_pragma): Don't do skipline here.  Only call real_yylex
116         in one place.
117
118         * lex.c (check_for_missing_semicolon): Handle SELFNAME.
119
120         * lex.c (handle_cp_pragma): Fix "#pragma implementation".
121
122 Wed Apr 17 16:51:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
123
124         * parse.y: New token SELFNAME for potential constructor.
125         * spew.c (yylex): Handle it.
126         * lex.c (identifier_type): Produce it.
127
128         * parse.y (complete_type_name): In :: case, don't push class binding.
129         (complex_type_name): Ditto.
130
131 Wed Apr 17 15:02:40 1996  Mike Stump  <mrs@cygnus.com>
132
133         * typeck.c (build_reinterpret_cast): Handle pointer to member
134         functions.
135
136 Wed Apr 17 12:28:26 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
137
138         * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
139         pragmas.
140         (check_newline): Put the vtable/unit/implementation/interface pragma
141         code into handle_cp_pragma, replacing it with a call.
142         (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
143         args.  Get the next token after handling the pragma token.
144
145 Wed Apr 17 10:28:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
146
147         * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
148         (convert_to_pointer_force): Ditto.
149
150         * init.c (build_new): Fix array new without -fcheck-new.
151
152 Tue Apr 16 13:44:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
153
154         * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
155         tree.c: Lose TYPE_NESTED_NAME.
156
157         * parse.y (nested_name_specifier_1): Don't treat non-identifiers
158         as identifiers.
159
160         * tree.def: Add VEC_INIT_EXPR.
161         * expr.c (cplus_expand_expr): Handle it.
162         * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
163         the extra file-scope symbol nastiness.
164
165 Mon Apr 15 16:21:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
166
167         * method.c (make_thunk): Thunks are static.
168         (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
169
170         * decl2.c (mark_vtable_entries): Emit thunks as needed.
171         (finish_file): Don't emit them here.
172
173 Sun Apr 14 11:34:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
174
175         * rtti.c (build_dynamic_cast): Handle null pointers.
176         (ifnonnull): New function.
177
178 Fri Apr 12 09:08:27 1996  Bob Manson  <manson@charmed.cygnus.com>
179
180         * call.c (build_method_call): Remember the original basetype we
181         were called with. Give an error message instead of trying
182         (incorrectly) to call a non-static member function through a
183         non-inherited class.
184
185         * search.c (expand_upcast_fixups): Mark the new fixup as
186         DECL_ARTIFICIAL.
187
188 Thu Apr 11 03:57:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
189
190         * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
191
192         * class.c (set_rtti_entry): Fix for thunks.
193
194         * decl2.c (import_export_decl): Still emit typeinfo fns for
195         cv-variants of builtin types.
196
197         * rtti.c (expand_class_desc): Set up base_info_type_node here.
198         (init_rtti_processing): Instead of here.
199
200 Wed Apr 10 14:17:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
201
202         * rtti.c (init_rtti_processing): Do init regardless of -frtti.
203         (build_typeid): Only complain about taking dynamic typeid without
204         -frtti.
205
206         * decl2.c: flag_rtti defaults to 1.
207
208         * rtti.c (get_tinfo_var): The general class case is now smaller.
209         (init_rtti_processing): Pack the latter three fields of base_info
210         into 32 bits.
211
212 Wed Apr 10 13:50:14 1996  Mike Stump  <mrs@cygnus.com>
213
214         * init.c (expand_member_init): Don't dump if name is NULL_TREE.
215
216 Wed Apr 10 12:56:02 1996  Mike Stump  <mrs@cygnus.com>
217
218         * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
219         (push_memoized_context): Split out code to undefer pop_type_level to
220         (clear_memoized_cache): here.
221         (pop_memoized_context): We can only handle one layer of deferral of
222         pop_type_level so clear the cache, if there was a previous level.
223
224 Tue Apr  9 23:06:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
225
226         * rtti.c (init_rtti_processing): Build up base_info_type_node.
227         (expand_class_desc): Use one pointer to an array of base_info
228         structs, passed using a CONSTRUCTOR.
229
230 Tue Apr  9 14:20:57 1996  Mike Stump  <mrs@cygnus.com>
231
232         * class.c (build_vbase_path): Remove block extern for
233         flag_assume_nonnull_objects here.
234         (build_vfn_ref): Split out functionality into build_vtbl_ref.
235         (build_vtbl_ref): New routine.
236         (build_vtable): Set up rtti info here.
237         (add_virtual_function): Note in CLASSTYPE_RTTI the best
238         place where we can get the rtti pointers from to avoid having to
239         search around for a place.
240         (finish_base_struct): Ditto.
241         (finish_struct_1): Ditto.  Never create totally new vtables with totally
242         new vtable pointers for rtti.  Disable code to layout vtable pointers
243         better until we want to break binary compatibility.
244         * rtti.c (build_headof_sub): New routine to convert down to a
245         sub-object that has an rtti pointer in the vtable.
246         (build_headof): Use it.  Also, use build_vtbl_ref now to be more
247         maintainable.
248         (build_dynamic_cast): Make sure we have saved it, if we need to.
249         * search.c (dfs_init_vbase_pointers): Disable code that deals with
250         a more efficient vtable layout, enable later.
251         * call.c (flag_assume_nonnull_objects): Moved declaration to
252         * cp-tree.h: here.  Declare build_vtbl_ref.
253         * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
254         function calls that want a tree.
255
256 Tue Apr  9 12:10:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
257
258         * rtti.c (build_dynamic_cast): Handle downcasting to X* given
259         other X subobjects in the most derived type.  Ack.
260
261         * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
262         get_typeid will do it for us.
263         (get_typeid_1): Break out call-building for expand_*_desc to use.
264         (get_typeid): Call it.
265         (expand_*_desc): Ditto.
266         * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
267         and void *.
268         (init_decl_processing): Lose builtin_type_tdescs lossage.
269         * decl2.c (finish_vtable_vardecl): Remove obsolete code.
270
271 Mon Apr  8 17:23:23 1996  Bob Manson  <manson@charmed.cygnus.com>
272
273         * pt.c (tsubst): When calling set_nested_typename, use
274         TYPE_NESTED_NAME (current_class_type) instead of
275         current_class_name.
276
277         * decl.c (pushdecl): Ditto.
278         (pushdecl_class_level): Ditto.
279         (grokdeclarator): Use NULL_TREE instead of 0 in the call to
280         set_nested_typename.
281
282 Sun Apr  7 10:44:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
283
284         * rtti.c (synthesize_tinfo_fn): Handle arrays.
285
286         * cp-tree.h (DECL_REALLY_EXTERN): New macro.
287
288 Sat Apr  6 13:56:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
289
290         * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
291         (init_rtti_processing): Lose bad_cast_type.
292         (build_dynamic_cast): Use throw_bad_cast.
293
294         * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
295
296         * decl2.c (finish_file): Don't synthesize artificial functions
297         that are external and not inline.
298
299         * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
300
301         * decl2.c (finish_file): Handle having new inlines added to
302         saved_inlines by synthesis.
303
304         * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
305
306 Fri Apr  5 17:02:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
307
308         RTTI rewrite to initialize nodes as needed, not require that
309         users #include <typeinfo>, complete functionality and reduce wasted 
310         space.
311         * rtti.c (init_rtti_processing): New fn.
312         (build_typeid): The vtable entry is now a function.
313         (get_tinfo_var): New fn.
314         (get_tinfo_fn): Ditto.
315         (get_typeid): Use it.
316         (build_dynamic_cast): Declare and use entry point __dynamic_cast.
317         (build_*_desc): Rename to expand_*_desc and rewrite to use entry
318         points __rtti_*.
319         (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
320         (synthesize_tinfo_fn): New fn.
321         * method.c (build_t_desc_overload): Lose.
322         (build_overload_with_type): More generic.
323         * decl.c (init_decl_processing): Call init_rtti_processing.
324         * class.c (set_rtti_entry): Use get_tinfo_fn.
325         * decl2.c (mark_vtable_entries): Mark the rtti function.
326         (finish_prevtable_vardecl): Don't build_t_desc.
327         (import_export_decl): Handle tinfo functions.
328         (finish_file): Ditto.
329         * typeck.c (inline_conversion): New fn.
330         (build_function_call_real): Use it.
331         * cp-tree.h: Add decls.
332
333         * method.c (hack_identifier): Also convert component_refs from
334         references.
335
336         * lex.c (cons_up_default_function): Use the type, not the name, in
337         declspecs.
338
339         * decl2.c (import_export_vtable): Fix weak vtables.
340
341 Fri Apr  5 13:30:17 1996  Bob Manson  <manson@charmed.cygnus.com>
342
343         * search.c (get_base_distance_recursive): Fix access checks for
344         protected bases.
345
346 Fri Apr  5 11:02:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
347
348         * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
349         cp-tree.h.
350         (convert_harshness): Add prototypes wrapped by PROTO.
351         * decl2.c (grok_function_init): Likewise.
352         (do_toplevel_using_decl): Change to void return type.
353         * class.c (build_vtable_entry): Remove decl of make_thunk.
354         (merge_overrides): Fix order of arg definitions.
355         (finish_vtbls): Likewise.
356         (fixup_vtable_deltas): Likewise.
357         (modify_all_direct_vtables): Likewise.
358         (modify_all_indirect_vtables): Likewise.
359         * search.c (get_base_distance_recursive): Likewise.
360         (get_abstract_virtuals_1): Likewise.
361         (fixup_virtual_upcast_offsets): Likewise.
362         (lookup_fnfields_1): Add prototypes wrapped by PROTO.
363         * init.c (perform_member_init): Fix order of arg definitions.
364         (expand_aggr_init_1): Add prototypes wrapped by PROTO.
365         * cp-tree.h (make_thunk): Add decl.
366         (overload_template_name, push_template_decl): Add decls.
367         (do_toplevel_using_decl): Change to void return type.
368         (vec_binfo_member): Add decl.
369
370 Thu Apr  4 13:33:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
371
372         * typeck.c (mark_addressable, convert_for_assignment,
373         convert_for_initialization, pointer_int_sum, pointer_diff,
374         unary_complex_lvalue): Add prototypes wrapped by PROTO.
375         (convert_sequence): #if 0 fn decl, since definition also is.
376
377 Thu Apr  4 11:00:53 1996  Mike Stump  <mrs@cygnus.com>
378
379         * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
380         cast to pointer types for type searching.
381
382 Wed Apr  3 17:10:57 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
383
384         * typeck.c (get_delta_difference): Use cp_error, not error, in the
385         case where BINFO == 0.
386
387 Wed Apr  3 12:01:02 1996  Mike Stump  <mrs@cygnus.com>
388
389         * call.c (build_method_call): Fix wording of error messages so
390         constructors come out right.
391
392 Tue Apr  2 16:06:59 1996  Bob Manson  <manson@charmed.cygnus.com>
393
394         * decl.c (push_overloaded_decl): Don't warn about hidden
395         constructors when both the type and the function are declared
396         in a system header file.
397
398 Mon Apr  1 09:03:13 1996  Bob Manson  <manson@charmed.cygnus.com>
399
400         * class.c (finish_struct_1): Propagate the TYPE_PACKED
401         flag for the type to the type's fields.
402
403 Sat Mar 30 12:14:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
404
405         * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
406
407 Fri Mar 29 15:51:36 1996  Bob Manson  <manson@charmed.cygnus.com>
408
409         * class.c (base_info, finish_base_struct): Replace 
410         needs_virtual_dtor with base_has_virtual.
411
412         (finish_struct_1): Remove the old code that tried to make default
413         destructors virtual. Use base_has_virtual when checking if we need
414         to add a vtable entry for the rtti code.
415
416 Fri Mar 29 14:02:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
417
418         * pt.c (push_template_decl): Complain about template decl with
419         inappropriate declaration.
420
421 Fri Mar 29 12:15:35 1996  Bob Manson  <manson@charmed.cygnus.com>
422
423         * typeck.c (build_x_unary_op): Remove bogus check for taking
424         the address of a member function.
425
426 Fri Mar 29 11:56:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
427
428         * parse.y (constructor_declarator): Only push the class if
429         we are not already in the class.
430
431 Fri Mar 29 09:41:02 1996  Jeffrey A. Law  <law@cygnus.com>
432
433         * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
434         Add additional argument to INIT_CUMULATIVE_ARGS.
435
436 Thu Mar 28 16:41:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
437
438         * decl.c (shadow_tag): Fix error about anon union with methods.
439
440         * parse.y (self_reference): Only generate a self-reference if this
441         is a non-template class.
442         (opt.component_decl_list): Only use it if it was generated.
443
444         * parse.y (component_decl_1): Use constructor_declarator.
445         (fn.def2): Ditto.
446         (notype_component_declarator0): Ditto.
447
448 Thu Mar 28 15:11:35 1996  Bob Manson  <manson@charmed.cygnus.com>
449
450         * typeck.c (build_x_unary_op): Add checks for taking the address
451         of a TARGET_EXPR or of a member function, and give appropriate
452         warnings.
453
454 Thu Mar 28 14:49:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
455
456         * pt.c (process_template_parm): Allow template type parms to be
457         used as types for template const parms.
458
459 Wed Mar 27 15:51:19 1996  Mike Stump  <mrs@cygnus.com>
460
461         * init.c (expand_vec_init): Ensure the eh cleanups are on the
462         function_obstack.
463
464 Wed Mar 27 10:14:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
465
466         * decl.c (lookup_name_real): Be even more picky about the
467         ambiguous lookup warning.
468         (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
469         * parse.y (constructor_declarator): Rather than here.
470
471         * parse.y (constructor_declarator): New nonterminal.
472         (fn.def1): Use it.
473         (explicit_instantiation): Ditto.
474
475 Tue Mar 26 13:41:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
476
477         Add implicit declaration of class name at class scope.
478         * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
479         * parse.y (self_reference): New nonterminal.
480         (opt.component_decl_list): Use it.
481         (fn.def1): Add nested_name_specifier type_name cases.
482         * class.c (build_self_reference): New function.
483         (finish_struct): Handle access_default later, move self-reference
484         decl to the end.
485         * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
486         * cp-tree.h: Adjust.
487
488         * pt.c (do_function_instantiation): Separate handling of member
489         functions and non-member functions properly.
490
491 Mon Mar 25 14:23:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
492
493         * pt.c (process_template_parm): Improve error for 'volatile class K'.
494
495         * class.c (finish_struct_1): Check the right slot for destructors.
496
497         * decl.c (start_enum): Complain about enum templates.
498
499 Mon Mar 25 13:25:31 1996  Mike Stump  <mrs@cygnus.com>
500
501         * init.c (resolve_offset_ref): Offset pointers to member data by one.
502         * typeck.c (unary_complex_lvalue): Ditto.
503
504 Mon Mar 25 13:30:42 1996  Bob Manson  <manson@charmed.cygnus.com>
505
506         * typeck.c (c_expand_return): Check for a returned local
507         array name, similar to the check for an ADDR_EXPR.
508
509 Mon Mar 25 13:07:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
510
511         * decl.c (cp_finish_decl): Don't build cleanups for static
512         variables here.
513
514 Fri Mar 22 17:57:55 1996  Mike Stump  <mrs@cygnus.com>
515
516         * typeck.c (build_modify_expr): Fix error messages to be more
517         accurate.
518         * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
519         assignment operators.
520         * error.c (assop_as_string): Ditto.  Add support for `%Q' for
521         assignment operators.
522
523 Fri Mar 22 13:48:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
524
525         * decl.c (grokdeclarator): Call bad_specifiers for typedefs.  Also
526         give an error if initialized.  Pedwarn about nested type with the
527         same name as its enclosing class.
528
529         * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
530
531         * typeck.c (require_complete_type): Be sure to instantiate the
532         MAIN_VARIANT of the type.
533
534         * decl2.c (finish_file): Instantiate pending templates before
535         processing static constructors and destructors.
536
537         * pt.c (instantiate_decl): Don't instantiate functions at toplevel
538         unless at_eof.
539
540 Fri Mar 22 09:30:17 1996  Bob Manson  <manson@beauty.cygnus.com>
541
542         * decl2.c (delete_sanity): If error_mark_node is passed
543         in as an expression, quit while we're ahead.
544
545         * decl.c (grokdeclarator): Give an error message if `friend'
546         is combined with any storage class specifiers.
547
548 Wed Mar 20 14:51:55 1996  Jason Merrill  <jason@yorick.cygnus.com>
549
550         * parse.y (named_complex_class_head_sans_basetype): Don't crash on
551         definition of nonexistent nested type.
552
553         * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
554         not to say 'typedef'.
555
556 Wed Mar 20 00:11:47 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
557
558         * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
559         * search.c (dfs_walk, dfs_init_vbase_pointers,
560         expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
561         (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
562
563 Tue Mar 19 17:56:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
564
565         * except.c (build_throw): Support minimal parse.
566         * pt.c (tsubst_copy): Support THROW_EXPR.
567         * decl2.c (build_expr_from_tree): Ditto.
568
569         * pt.c (mangle_class_name_for_template): Always allocate
570         scratch_firstobj.
571
572 Tue Mar 19 16:34:31 1996  Bob Manson  <manson@beauty.cygnus.com>
573
574         * cvt.c (cp_convert_to_pointer): Give an appropriate error
575         when trying to cast from an incomplete type.
576
577 Tue Mar 19 16:00:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
578
579         * pt.c (instantiate_class_template): Don't bother setting up
580         CLASSTYPE_TAGS explicitly, as the nested types will add
581         themselves.
582
583 Tue Mar 19 15:48:43 1996  Bob Manson  <manson@beauty.cygnus.com>
584
585         * decl.c (shadow_tag): Remove old error check for usage of
586         an enum without a previous declaration.
587         (xref_tag): Add error message about usage of enums without a
588         previous declaration.
589
590 Tue Mar 19 09:21:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
591
592         * lex.c (do_identifier): Only do name consistency check if we're
593         parsing.
594
595         * pt.c (push_template_decl): Don't crash if we get a member defn
596         that doesn't match.
597
598         * decl.c (xref_tag_from_type): New function to do an xref without
599         always having to figure out code_type_node.
600         * cp-tree.h: Declare it.
601         * pt.c (instantiate_class_template): Use it for friend classes.
602         (lookup_template_class): Use it.
603
604         * typeck2.c (build_functional_cast): Pull out a single parm before
605         passing it to build_c_cast.
606
607 Tue Mar 19 09:07:15 1996  Bob Manson  <manson@beauty.cygnus.com>
608
609         * expr.c (do_case): Give an error message if a pointer is
610         given as a case value.
611
612 Mon Mar 18 21:57:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
613
614         * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
615         an overload list.
616
617         * lex.c (cons_up_default_function): Really, now, interface hackery
618         does not apply to synthesized methods.
619
620 Mon Mar 18 18:20:57 1996  Mike Stump  <mrs@cygnus.com>
621
622         * call.c (build_method_call): Ctors and dtors now have special names
623         with respect to lookups.
624         * class.c (add_method): Ditto.
625         (grow_method): Ditto.
626         (finish_struct_methods): Ditto.
627         (warn_hidden): Ditto.
628         (finish_struct_1): Ditto.
629         * cvt.c (convert_to_reference): Ditto.
630         (convert_to_aggr): Ditto.
631         (cp_convert): Ditto.
632         * decl2.c (check_classfn): Ditto.
633         * init.c (expand_member_init): Ditto.
634         (expand_default_init): Ditto.
635         (expand_aggr_init_1): Ditto.
636         (build_offset_ref): Ditto.
637         (build_new): Ditto.
638         (build_delete): Ditto.
639         * lex.c (do_inline_function_hair): Ditto.
640         * search.c (lookup_field_1): Ditto.
641         (lookup_fnfields_here): Ditto.
642         (lookup_field): Ditto.
643         (lookup_fnfields): Ditto.
644         (get_virtual_destructor): Ditto.
645         (dfs_debug_mark): Ditto.
646         (dfs_pushdecls): Ditto.
647         (dfs_compress_decls): Ditto.
648         * tree.c (layout_basetypes): Ditto.
649         * typeck.c (build_component_ref): Ditto.
650         (build_x_function_call): Ditto.
651         (build_modify_expr): Ditto.
652         (convert_for_initialization): Ditto.
653         (build_functional_cast): Ditto.
654         * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Ditto.
655         (CTOR_NAME): New.
656         (DTOR_NAME): New.
657         * decl.c (ctor_identifier): New.
658         (dtor_identifier): New.
659         (init_decl_processing): Set them.
660
661 Mon Mar 18 18:00:51 1996  Mike Stump  <mrs@cygnus.com>
662
663         * typeck.c (build_component_ref): Don't get confused by fields whose
664         context has no type name, like pointer to member functions.
665
666 Mon Mar 18 13:19:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
667
668         * decl.c (grokdeclarator): Handle typedef without declarator.
669
670         * pt.c (tsubst): Handle SCOPE_REF in declarator.
671
672         * parse.y (bad_parm): Catch another case of missing `typename'.
673
674         * lex.c (yyprint): Handle TYPE_DECLs.
675
676         * decl.c (start_function): Don't try to be clever.
677
678         * lex.c: Lose compiler_error_with_decl.
679         * typeck2.c: Lose error_with_aggr_type.
680         (incomplete_type_error): Use cp_* instead of old functions.
681         (readonly_error): Ditto.
682         * typeck.c (convert_arguments): Ditto.
683         * search.c (lookup_nested_field): Ditto.
684         * method.c (make_thunk): Ditto.
685         * decl.c (grokparms): Ditto.
686         * cp-tree.h: Update.
687
688         * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
689         and value.
690
691 Mon Mar 18 11:25:52 1996  Bob Manson  <manson@beauty.cygnus.com>
692
693         * method.c (build_opfncall): When deleting a pointer to an
694         array, build a new pointer to the tree past any ARRAY_TYPE
695         nodes.
696
697 Mon Mar 18 10:11:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
698
699         * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
700
701 Fri Mar 15 11:03:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
702
703         * pt.c (instantiate_decl): Only call import_export_decl if at_eof
704         and ! DECL_INLINE.
705
706         * decl.c (finish_function): Don't set nested based on
707         hack_decl_function_context.
708         * parse.y (function_try_block): Check for nested function.
709         (pending_inlines): Ditto.
710
711         * decl2.c (build_expr_from_tree): If a unary op already has a
712         type, just return it.
713
714         * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
715
716         * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
717         (finish_file): Check the return value of walk_vtables.
718         (finish_prevtable_vardecl): Return int.
719         (finish_vtable_vardecl): Ditto.
720         (prune_vtable_vardecl): Ditto.
721         * lex.c (set_vardecl_interface_info): Ditto.
722         * cp-tree.h: Adjust return types.
723
724         * class.c (delete_duplicate_fields_1): Don't complain about
725         duplicate nested types if they're the same type.
726         (finish_struct): Remove check for duplicate.
727         * decl2.c (grokfield): Don't check for typedef of anonymous type.
728
729 Thu Mar 14 10:00:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
730
731         * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
732
733         * decl.c (grokdeclarator): Lose special handling of class-level
734         typedef.  Lose SIGNATURE_GROKKING_TYPEDEF.  Set
735         SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
736
737         * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
738
739         * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
740
741         * search.c (compute_access): Fix handling of anonymous union
742         members.
743         * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
744         from anonymous unions to their members.
745
746         * typeck.c (build_x_function_call): For static member functions,
747         hand off to build_member_call.
748
749 Wed Mar 13 14:03:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
750
751         * typeck.c (build_component_ref): Handle OFFSET_REFs.
752
753         * init.c (expand_vec_init): Fix init == 0 case.
754
755 Tue Mar 12 14:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
756
757         * init.c (build_new): Pedwarn about init and array new.
758         (expand_vec_init): Handle lists, use convert_for_initialization
759
760         * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
761         when converting to an aggregate type.
762         * cvt.c (cp_convert): Pass it through.
763
764         * typeck.c (build_conditional_expr): Handle user-defined
765         conversions to slightly different types.
766
767         * decl.c (grokdeclarator): Force an array type in a parm to be
768         permanent.
769
770         * decl2.c (do_using_directive): Sorry.
771         (do_namespace_alias): Ditto.
772         * lex.c (real_yylex): Warn about using the `namespace' keyword.
773
774 Sun Mar 10 22:26:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
775
776         * parse.y (datadef): Move call to note_list_got_semicolon up.
777
778 Fri Mar  8 11:47:26 1996  Mike Stump  <mrs@cygnus.com>
779
780         * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
781
782 Fri Mar  8 11:29:06 1996  Mike Stump  <mrs@cygnus.com>
783
784         * decl.c (cp_finish_decl): The exception regions have to be
785         nested, not overlapping.  We start the exception region for a
786         decl, after it has been fully built, and all temporaries for it
787         have been cleaned up.
788
789 Thu Mar  7 17:46:06 1996  Mike Stump  <mrs@cygnus.com>
790
791         * tree.c (vec_binfo_member): Don't core dump if we have no bases.
792
793 Thu Mar  7 14:11:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
794
795         * tree.def: Add RETURN_INIT.
796         * pt.c (instantiate_decl): Handle RETURN_INIT.
797         * decl.c (store_return_init): Handle minimal_parse_mode.
798
799         * tree.c (cp_build_type_variant): Just return an error_mark_node.
800         * decl.c (make_typename_type): Don't try to get the file and line
801         of an identifier.
802         * typeck.c (comptypes): Handle TYPENAME_TYPE.
803
804 Wed Mar  6 18:47:50 1996  Per Bothner  <bothner@kalessin.cygnus.com>
805
806         * decl.c (poplevel): Make sure we clear out and restore old local
807         non-VAR_DECL values by default when they go out of scope.
808
809 Wed Mar  6 09:57:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
810
811         * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
812         referring to addresses of variables and functions.
813
814         * error.c (dump_expr): Support SIZEOF_EXPR.
815
816         * init.c (do_friend): Use the return value of check_classfn.
817
818         * typeck.c (convert_arguments): Call complete_type.
819
820         * method.c (hack_identifier): After giving an error, set value to
821         error_mark_node.
822
823 Tue Mar  5 16:00:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
824
825         * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
826         lossage for local classes.
827         * cp-tree.h: Declare it.
828         * decl.c (lookup_name_real): Evil, painful hack for local classes.
829         (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
830         Use hack_decl_function_context.
831         (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
832         (start_function): Use hack_decl_function_context.
833         (finish_function): Ditto.
834         * method.c (synthesize_method): Ditto.
835         * lex.c (process_next_inline): Ditto.
836         (do_pending_inlines): Ditto.
837         * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
838         done with it.
839
840 Mon Mar  4 22:38:39 1996  Gerald Baumgartner  <gb@alexander.cs.purdue.edu>
841
842         * sig.c (build_signature_pointer_or_reference_type): Align
843         signature pointers/references on 8-byte boundaries so they can be
844         grabbed 2 words at a time on a Sparc.
845
846 Tue Mar  5 10:21:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
847
848         * method.c (hack_identifier): Requiring a static chain is now a
849         hard error.
850         * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
851         functions.
852
853 Mon Mar  4 20:03:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
854
855         * init.c (build_offset_ref): Call complete_type.
856
857         * decl.c (pop_from_top_level): Always pop previous_class_type.
858
859         * parse.y: Handle multiple decls in a for-init-statement.
860         * pt.c (tsubst_expr): Ditto.
861
862         * pt.c (tsubst): Use tsubst_expr for the second operand of an
863         ARRAY_REF.
864
865         * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
866         (poplevel_class): Set it here.
867         (pop_from_top_level): Pop it here if we're returning to class scope.
868         * class.c (pushclass): Don't set it here.
869
870         * decl.c (maybe_push_to_top_level): Save current_template_parms,
871         and clear it if !pseudo.
872         (pop_from_top_level): Restore it.
873
874         * decl2.c (finish_file): Push the dummy each time we walk the list
875         of vtables.
876
877         * error.c (dump_expr): Support LOOKUP_EXPR and actually do
878         something for CAST_EXPR.
879         
880 Mon Feb 19 14:49:18 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
881
882         * cvt.c (cp_convert): Warn about implicit conversion of the
883         address of a function to bool, as it is always true.
884
885 Fri Feb 23 23:06:01 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
886
887         * typeck.c (c_expand_return): Fix warning for local externs returned.
888
889 Mon Mar  4 15:03:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
890
891         * tree.c (mapcar): Propagate const and volatile properly.
892
893         * typeck.c (complete_type): Be sure to instantiate the
894         MAIN_VARIANT of the type.
895
896         * method.c (synthesize_method): Class interface hackery does not
897         apply to synthesized methods.
898
899 Mon Mar  4 14:05:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
900
901         * pt.c (comp_template_args): Use comptypes rather than just
902         checking for TEMPLATE_TYPE_PARM equivalence.
903
904         * typeck.c (build_x_function_call): Call complete_type before
905         checking TYPE_OVERLOADS_CALL_EXPR.
906
907 Mon Mar  4 18:48:30 1996  Manfred Hollstein   <manfred@lts.sel.alcatel.de>
908
909         * g++.c (main): Check also for new define ALT_LIBM.
910
911 Fri Mar  1 13:09:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
912
913         * pt.c (instantiate_class_template): If we don't have a pattern
914         yet, that's OK.
915         (coerce_template_parms): If we see a local class, bail.
916
917         * decl.c (grok_reference_init): Make sure there's a type before
918         checking its code.
919
920         * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
921         (push_template_decl): Ditto.
922
923         * parse.y (named_class_head): Set
924         CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
925
926         * decl.c (xref_tag): Diagnose redeclaration of template
927         type-parameter name.
928
929         * error.c (dump_type): Handle anonymous template type parms.
930
931         * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
932         TYPE_STUB_DECL.
933         (coerce_template_parms): Ditto.
934
935 Thu Feb 29 16:26:01 1996  Mike Stump  <mrs@cygnus.com>
936
937         * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
938         case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
939
940 Thu Feb 29 08:20:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
941
942         * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
943         before trying to get its STUB_DECL.
944         (coerce_template_parms): Ditto.
945
946         * parse.y (template_type_parm): If they didn't use 'class',
947         pretend they did after giving an error.
948
949         * pt.c (coerce_template_parms): Diagnose use of local class.
950
951         * decl.c (grok_reference_init): Use instantiate_type.
952
953         * error.c (dump_expr): Handle TEMPLATE_DECLs.
954
955         * parse.y (named_class_head): Diagnose mismatching types and tags.
956
957         * decl.c (pushdecl): Type decls and class templates clash with
958         artificial type decls, not hide them.
959
960         * decl.c (redeclaration_error_message): Diagnose redefinition of
961         templates properly.
962         (duplicate_decls): Diagnose disallowed overloads for template
963         functions, too.
964
965         * decl.c (start_decl): Call complete_type before checking for a
966         destructor.
967
968         * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
969
970         * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
971
972 Wed Feb 28 09:28:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
973
974         * decl.c (grok_op_properties): Don't check for operator++(int) in
975         a template.
976
977         * tree.c (perm_manip): Return a copy of variable and function
978         decls with external linkage.
979
980         * tree.def: Change some of the min tree codes to type "1".
981         * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
982         * method.c (build_overload_int): Emit something arbitrary for
983         anything but an INTEGER_CST if we're in a template.
984
985         * decl.c (cp_finish_decl): Call complete_type before deciding
986         whether or not to lay out the decl.
987
988         * lex.c (do_identifier): Check for DECL_INITIAL before using it.
989
990 Tue Feb 27 16:35:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
991
992         * typeck2.c (build_x_arrow): Call complete_type.
993
994         * pt.c (add_pending_template): Broken out.
995         (lookup_template_class): If -fexternal-templates, call it for all
996         the methods of implemented types.
997         (instantiate_class_template): Instead of instantiating them here.
998         (instantiate_decl): Handle -fexternal-templates earlier.
999
1000 Tue Feb 27 15:51:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
1001
1002         * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
1003         memoized lookup stuff inside GATHER_STATISTICS.
1004
1005 Tue Feb 27 10:38:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
1006
1007         * decl.c (start_decl): Complain about array of incomplete type
1008         here.
1009         (grokdeclarator): Not here.
1010
1011         * parse.y (template_parm): Expand full_parm inline so we can set
1012         the rule's precedence.
1013
1014         * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
1015         (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
1016         * decl2.c (grokbitfield): Don't check for integer constant here.
1017         * class.c (finish_struct_1): Check here.
1018
1019         * decl.c (define_label): Make the min decl go on permanent_obstack.
1020
1021         * pt.c (unify): Don't handle CONST_DECLs.
1022         (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
1023         (tsubst_copy): Ditto.
1024
1025         * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
1026         CONST_DECL for a template parm.
1027
1028 Mon Feb 26 12:48:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
1029
1030         * decl.c (grokdeclarator): Complain about array of incomplete type
1031         here.
1032         (start_decl_1): Not here.
1033
1034         * pt.c (tsubst): Handle pointer-to-function declarators.
1035
1036         * method.c (hack_identifier): If pedantic, diagnose local class
1037         methods that require a static chain.
1038
1039         * decl.c (grok_op_properties): No longer static.
1040         * cp-tree.h: Declare it.
1041         * pt.c (tsubst): Call it for operators.
1042         Use tsubst_copy for TREE_VECs.
1043
1044         * parse.y (template_arg): The expr has precedence like '>'.
1045
1046 Fri Feb 23 14:51:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
1047
1048         * pt.c (coerce_template_parms): Don't coerce an expression using
1049         template parms.
1050         (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
1051         (tsubst): Don't use build_index_2_type if the max_value uses template
1052         parms.
1053         * method.c (build_overload_int): Emit something arbitrary for an
1054         expression using template parms.
1055
1056         * parse.y (template_close_bracket): New non-terminal to catch use
1057         of '>>' instead of '> >' in template class names.
1058         (template_type): Use it.
1059         * Makefile.in (CONFLICTS): Causes one more r/r conflict.
1060
1061         * tree.def: Add CAST_EXPR.
1062         * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
1063         CONVERT_EXPR for minimal_parse_mode.
1064         * typeck.c (build_c_cast): Ditto.
1065         * pt.c (tsubst_copy): Ditto.
1066         * decl2.c (build_expr_from_tree): Ditto.
1067         * error.c (dump_expr): Ditto.
1068
1069 Fri Feb 23 10:36:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
1070
1071         * except.c (SetTerminate, SetUnexpected): Put back global vars.
1072         (init_exception_processing): Put back decl/init of
1073         set_unexpected_fndecl and set_terminate_fndecl, needed to get the
1074         fns from libstdc++.
1075
1076         * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
1077         (declare_uninstantiated_type_level, uninstantiated_type_level_p):
1078         Delete unused fns.
1079         * cp-tree.h (declare_uninstantiated_type_level,
1080         uninstantiated_type_level_p): Delete prototypes.
1081
1082 Thu Feb 22 19:36:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
1083
1084         * pt.c (tsubst_expr): Add default return.
1085
1086 Thu Feb 22 16:47:24 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
1087
1088         * error.c (fndecl_as_string): Delete unused arg CNAME.
1089         * sig.c (build_signature_table_constructor,
1090         build_signature_method_call): Fix calls.
1091
1092         * class.c (the_null_vtable_entry): Delete var definition.
1093         (init_class_processing): Delete tree the_null_vtable_entry init.
1094         * decl.c (no_print_{functions, builtins}): Declare as static.
1095         (__tp_desc_type_node): #if 0 var definition.
1096         (init_type_desc): #if 0 init of __tp_desc_type_node.
1097         (vb_off_identifier): Move var decl into init_decl_processing.
1098         (current_function_assigns_this): Declare as static.
1099         (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
1100         (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
1101         Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
1102         * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
1103         * init.c (BI_header_type, BI_header_size): Declare as static.
1104         * pt.c (template_classes): Delete unused var.
1105         (add_pending_template): Delete decl for non-existent fn.
1106         (lookup_template_class): Delete vars CODE and TAG_CODE.
1107         (instantiate_template): Delete unused var TARGS.
1108         * cp-tree.h (vb_off_identifier, current_function_assigns_this):
1109         Delete decls.
1110         (__tp_desc_type_node): #if 0 var decl.
1111         (fndecl_as_string): Fix prototype.
1112
1113 Thu Feb 22 15:56:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
1114
1115         * tree.def: Add GOTO_STMT.
1116         * pt.c (tsubst_expr): Support goto and labels.
1117         * decl.c (define_label): Support minimal parsing.
1118         * parse.y (simple_stmt): Ditto.
1119
1120 Thu Feb 22 15:30:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
1121
1122         * xref.c (GNU_xref_member): Only define/set var I if
1123         XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
1124         used.
1125         (GNU_xref_end_scope): Delete unused fifth arg TRNS.
1126         (GNU_xref_end): Fix call.
1127         * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
1128         * cp-tree.h (GNU_xref_end_scope): Fix prototype.
1129
1130         * tree.c (build_exception_variant): Delete unused vars I, A, T,
1131         T2, and CNAME.
1132         (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
1133         (mapcar): Delete unused var CODE.
1134         (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
1135         (break_out_cleanups): Fix call.
1136         (bot_manip): Likewise.
1137         * call.c (build_method_call): Likewise.
1138         * cvt.c (build_up_reference, convert_to_reference, cp_convert):
1139         Likewise.
1140         * typeck.c (unary_complex_lvalue, build_modify_expr,
1141         convert_for_initialization): Likewise.
1142         * typeck2.c (build_functional_cast): Likewise.
1143         * cp-tree.h (build_cplus_new): Fix prototype.
1144
1145         * repo.c (open_repo_file): Delete unused var Q.
1146         (repo_compile_flags, repo_template_declared,
1147         repo_template_defined, repo_class_defined, repo_inline_used,
1148         repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
1149         (repo_get_id, repo_vtable_used): Declare as static. 
1150         * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
1151         prototypes.
1152
1153 Thu Feb 22 14:53:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
1154
1155         * parse.y (pending_inlines): Add function_try_block case.
1156
1157         * pt.c (unify): Fix for template const parms.
1158
1159 Thu Feb 22 13:24:15 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
1160
1161         * lex.c (extract_interface_info): Delete forward decl.
1162         (default_copy_constructor_body, default_assign_ref_body): Delete
1163         decls for non-existent functions.
1164         (synth_firstobj, inline_text_firstobjs): Delete unused vars.
1165         (init_lex): Delete setting them.
1166         (cons_up_default_function): Delete unused vars FUNC_BUF,
1167         FUNC_LEN, and COMPLEX.  Delete code setting COMPLEX.  Delete old
1168         #if 0'd synth code.
1169         (toplevel, expression_obstack): Delete unused extern decls.
1170         (tree_node_kind): Delete unused enum.
1171         (tree_node_counts, tree_node_sizes): Wrap with #ifdef
1172         GATHER_STATISTICS.
1173         (tree_node_kind_names): Delete unused extern decl.
1174         (synth_obstack): Delete unused var.
1175         (init_lex): Don't set it.
1176         (init_parse): Add decl before use.
1177         (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
1178         (current_unit_{name, language}): Delete unused vars. 
1179         (check_newline): Don't bother setting them, just accept the #pragma.
1180         * cp-tree.h (init_repo, peek_yylex): Add prototypes.
1181         (current_unit_{name, language}): Delete decls.
1182
1183         * search.c: Wrap all of the memoized functions, macros, and
1184         variables inside #ifdef GATHER_STATISTICS.
1185         (lookup_field, lookup_fnfields): Likewise.
1186         (init_search_processing): Likewise.
1187         (reinit_search_statistics): Wrap whole function.
1188         * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
1189
1190         * decl.c (finish_function): Only call pop_memoized_context if
1191         GATHER_STATISTICS is defined.
1192         (start_function): Likewise for push_memoized_context.
1193         * class.c (pushclass, popclass): Likewise.
1194
1195         * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
1196         * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
1197
1198         * cvt.c (cp_convert): Delete unused local var FORM.
1199         * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
1200         prototypes.
1201
1202 Thu Feb 22 13:19:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
1203
1204         * pt.c (do_poplevel): Oops; really return what we get from
1205         poplevel this time.
1206
1207 Thu Feb 22 11:41:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
1208
1209         * cp-tree.h (is_aggr_type): Add prototype.
1210
1211         * cp-tree.h ({push,pop}_cp_function_context): Add decls.
1212         * method.c ({push,pop}_cp_function_context): Delete decls.
1213         * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
1214         (SetUnexpected, SetTerminate): Delete unused vars.
1215         (init_exception_processing): Don't set SetUnexpected or
1216         SetTerminate.  Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
1217         (output_exception_table_entry): Delete unused array LABEL.
1218         (expand_internal_throw): Delete unused var PARAMS.
1219         (expand_start_catch_block): Delete unused var CLEANUP.
1220         (emit_exception_table): Delete unused var EH_NODE_DECL.
1221         (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
1222         GOTO_UNWIND_AND_THROW.  Don't set them.
1223         (end_eh_unwinder): Add top decl.
1224         (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
1225         (exception_section, push_rtl_perm, do_function_call,
1226         lang_interim_eh, push_eh_cleanup, eh_outer_context,
1227         expand_end_eh_spec, end_eh_unwinder): Declare as static.
1228         (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
1229         throw_used): Likewise.
1230         * cp-tree.h (expand_end_eh_spec): Delete prototype.
1231
1232         * search.c (dfs_mark, dfs_mark_vtable_path,
1233         dfs_unmark_vtable_path, dfs_mark_new_vtable,
1234         dfs_unmark_new_vtable, dfs_clear_search_slot,
1235         dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
1236         bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
1237         bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
1238         functions.
1239         (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
1240         n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
1241         n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
1242         Only define #ifdef GATHER_STATISTICS.
1243         (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
1244         is defined.
1245         (vbase_decl): Delete var definition.
1246         (init_search): Delete old decl.
1247         (init_vbase_pointers): Delete building of VBASE_DECL, since it's
1248         never actually used.
1249         (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
1250         (get_base_distance_recursive): Delete unused fourth arg
1251         BASETYPE_PATH.  Fix call .
1252         (get_base_distance): Fix call.
1253         (push_class_decls): Delete unused var ID.
1254         (make_memoized_table_entry): Declare as static.
1255         (breadth_first_search): Declare as static.
1256         (tree_has_any_destructor_p): Declare as static.
1257         (pop_class_decls): Delete unused arg pop_class_decls.
1258         * class.c (popclass): Fix call to pop_class_decls.
1259         * cp-tree.h (make_memoized_table_entry, breadth_first_search,
1260         tree_has_any_destructor_p): Delete prototypes.
1261
1262         * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
1263         (build_t_desc): Fix call.  Delete unused vars ELEMS and TT.
1264         (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
1265         (build_user_desc): Delete unused var T.
1266         (build_class_desc): Delete unused vars T and OFF.
1267         (build_t_desc): Delete unused var NAME_STRING.
1268         (build_headof): Make static.
1269         (get_bad_cast_node): Likewise.
1270         (get_def_to_follow): Likewise.
1271         * cp-tree.h (init_type_desc): Add prototype.
1272         (build_headof): Remove prototype.
1273
1274 Thu Feb 22 00:54:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
1275
1276         * pt.c (tsubst): Only look for matching decls at file scope for
1277         non-member functions.
1278
1279         * call.c (build_scoped_method_call): Handle scoped destructor
1280         calls in templates.
1281
1282         * decl.c (*_top_level): Also save previous_class_values.
1283
1284         * pt.c (tsubst_expr): Support do {} while loops.
1285         * parse.y (simple_stmt): Ditto.
1286         * tree.def: Ditto.
1287
1288         * method.c (build_overload_identifier): For a class nested in a
1289         template class, don't mangle in the template parms from our
1290         context.
1291
1292         * lex.c, cp-tree.h: Remove support for template instantiations in
1293         the pending_inlines code.
1294         * pt.c: Remove dead functions and unused arguments.
1295         (uses_template_parms): TYPENAME_TYPEs always use template parms.
1296         * parse.y: Stop passing anything to end_template_decl.
1297         * tree.c (print_lang_statistics): Only print tinst info #ifdef
1298         GATHER_STATISTICS.
1299
1300 Wed Feb 21 16:57:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
1301
1302         * init.c (expand_recursive_init{,_1}): Delete decls. 
1303         (sort_member_init): Delete unused var INIT.
1304         (emit_base_init): Delete unused var X.
1305         (build_offset_ref): Delete unused var CNAME.
1306         (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
1307         (emit_base_init): Delete unused local var BASE.  Delete extern
1308         decl of IN_CHARGE_IDENTIFIER.
1309         (build_delete): Delete unused local var VIRTUAL_SIZE.
1310
1311         * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
1312         (build_delete): Fix call.
1313         * decl2.c (delete_sanity): Likewise.
1314         * cp-tree.h (build_vec_delete): Update prototype.
1315
1316         * typeck.c (common_base_type): Delete unused var TMP.
1317         (build_binary_op): Delete local var ARGS_SAVE.
1318         (build_array_ref): Delete unused var ITYPE.
1319         (c_expand_return): Delete unused var USE_TEMP.
1320
1321         * typeck.c (compexcepttypes): Delete unused arg STRICT.
1322         (comptypes): Fix calls.
1323         * decl.c (duplicate_decls): Likewise.
1324         * cp-tree.h (compexcepttypes): Delete extra arg.
1325
1326         * decl2.c (check_classfn): Delete unused second arg CNAME.
1327         * decl.c (start_decl, grokfndecl): Fix calls.
1328         * init.c (do_friend): Likewise.
1329         * cp-tree.h (check_classfn): Update prototype.
1330
1331         * cp-tree.h (signature_error, import_export_vtable,
1332         append_signature_fields, id_in_current_class, mark_used,
1333         copy_assignment_arg_p): Add decls.
1334         * decl2.c (mark_used): Delete decl.
1335
1336         * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
1337
1338         * class.c (get_vtable_entry): Diable unused function.
1339         (doing_hard_virtuals): Delete unused static global var.
1340         (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
1341         (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
1342         (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
1343         (modify_one_vtable): Delete unused var OLD_RTTI.
1344         (finish_struct_anon): Delete unused vars OFFSET and X.
1345         (finish_struct_bits): Delete unused var METHOD_VEC.
1346         (get_basefndecls): Delete unused var PURPOSE.  Delete unused
1347         for-scope local variable METHODS.
1348
1349         * call.c (user_harshness): Delete unused/unneeded arg PARM.
1350         (ideal_candidate): Delete unused args BASETYPE and PARMS.
1351         (build_method_call): Delete unused args passed into ideal_candidate.
1352         (build_overload_call_real): Likewise.  Delete unused var OVERLOAD_NAME.
1353         * cp-tree.h (synthesize_method): Add decl.
1354
1355         * decl.c (note_level_for_for): Give void return type.
1356         (pushdecl_nonclass_level): Likewise.
1357         (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
1358         (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
1359         (suspend_binding_level): Delete unused var LEVEL.
1360         (duplicate_decls): Delete unused var CTYPE.
1361         (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
1362         (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
1363         PTR_ENDLINK.
1364         (grokdeclarator): Delete unused var C.
1365         (grokdeclarator): Delete unused var SIZE_VARIES.
1366         (grokparms): Delete unused var SAW_VOID.
1367         (start_function): Delete unused var OLDDECL.
1368         (cplus_expand_expr_stmt): Delete unused var
1369         REMOVE_IMPLICIT_IMMEDIATELY. 
1370
1371         * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
1372
1373         * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
1374
1375 Wed Feb 21 00:06:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
1376
1377         * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
1378         (build_min_nt): Ditto.
1379         * pt.c (do_pushlevel): Emit line note.
1380         (do_poplevel): Return what we get from poplevel.
1381         (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
1382         * parse.y: Use do_pushlevel and do_poplevel.
1383         * cp-tree.h: Declare do_poplevel.
1384         
1385         * cp-tree.h: Declare at_eof.
1386         * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
1387         * decl2.c (import_export_decl): Renamed from import_export_inline.
1388         (finish_file): Call it to do interface handling for statics.
1389         * pt.c (tsubst_copy): Call mark_used on variables and functions
1390         used here.
1391
1392         * decl2.c (finish_file): Don't emit statics we can't generate.
1393         * pt.c (instantiate_decl): Don't set interface on instantiations
1394         we can't generate.
1395
1396         * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
1397         * tree.c (print_lang_statistics): Print max template depth.
1398         * pt.c (push_tinst_level): Dump entire instantiation context.
1399         (instantiate_class_template): Use it and pop_tinst_level.
1400         (instantiate_decl): Ditto.
1401
1402         * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
1403         pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
1404
1405 Tue Feb 20 18:21:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
1406
1407         * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
1408         init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
1409         tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
1410         the new template implementation.
1411
1412 Tue Feb 20 17:14:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
1413
1414         * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
1415
1416 Thu Feb 15 18:44:42 1996  Mike Stump  <mrs@cygnus.com>
1417
1418         * decl.c (cp_finish_decl): Delay emitting the debug information for
1419         a typedef that has been installed as the canonical typedef, if the
1420         type has not yet been defined.
1421
1422 Thu Feb 15 09:39:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
1423
1424         * decl2.c (grokfield): Still call pop_nested_class for access decls.
1425
1426 Wed Feb 14 17:30:04 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
1427
1428         * decl.c (lookup_label): Call label_rtx.
1429
1430         * decl.c (make_binding_level): New function.
1431         (pushlevel, pushlevel_class): Call it instead of explicit
1432         duplicate calls to xmalloc.
1433
1434         * decl.c (init_decl_processing): Delete useless build_pointer_type
1435         call.
1436
1437         * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
1438         (sizet_ftype_string): Delete variable.
1439         (init_decl_processing): Add built-in functions fabsf, fabsl,
1440         sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl.  New local
1441         variable strlen_ftype, used for strlen.
1442
1443 Wed Feb 14 16:21:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
1444
1445         * decl.c (push_to_top_level): Start from current_binding_level
1446         again for now; the stl hacks depend on g++ being broken in this
1447         way, and it'll be fixed in the template rewrite.
1448
1449         * tree.def: Add USING_DECL.
1450         * decl2.c (do_class_using_decl): Implement.
1451         (grokfield): Pass access decls off to do_class_using_decl instead of
1452         grokdeclarator.
1453         * error.c (dump_decl): Handle USING_DECLs.
1454         * decl.c (grokdeclarator): Remove code for handling access decls.
1455         * class.c (finish_struct_1): Adjust accordingly, treat using-decls
1456         as access decls for now.
1457         (finish_struct): Don't check USING_DECLs for other uses of the name.
1458
1459         * search.c (get_matching_virtual): Use cp_error_at.
1460
1461 Wed Feb 14 10:36:58 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
1462
1463         * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
1464         match c-typeck.c.
1465         (self_promoting_args_p): Move the check that TYPE is non-nil
1466         before trying to look at its main variant.
1467         (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
1468
1469         * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
1470         Delete macros.
1471         * init.c (xref_friend, embrace_waiting_friends): Delete functions.
1472         (do_friend): Delete call to xref_friend.
1473         * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
1474
1475         * typeck.c (convert_sequence): #if 0 unused function.
1476
1477         * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
1478         be in decl_in_memory_p.
1479         (decl_in_memory_p): Delete decl.
1480         * expr.c (decl_in_memory_p): Delete fn.
1481         * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
1482
1483         * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
1484
1485 Tue Feb 13 12:51:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
1486
1487         * class.c (finish_struct_1): Check for a pure-specifier on a
1488         non-virtual function here.
1489
1490         * decl2.c (grok_function_init): Don't check whether the function
1491         is virtual here.
1492         (grokfield): Don't call check_for_override here.
1493
1494         * decl.c (push_to_top_level): Start from inner_binding_level,
1495         check class_shadowed in class levels.
1496
1497 Mon Feb 12 17:46:59 1996  Mike Stump  <mrs@cygnus.com>
1498
1499         * decl.c (resume_level): Ignore things that don't have names, instead
1500         of core dumping.
1501
1502 Mon Feb 12 15:47:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
1503
1504         * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
1505
1506 Sat Feb 10 17:59:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
1507
1508         * class.c (finish_struct_1): Set DECL_VINDEX properly on a
1509         synthesized dtor.
1510
1511         * parse.y (complete_type_name): Bind global_scope earlier.
1512         (complex_type_name): Ditto.
1513         (qualified_type_name): Remove.
1514
1515 Thu Feb  8 15:15:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
1516
1517         * decl.c (grokfndecl): Move code that looks for virtuals in base
1518         classes...
1519         * class.c (check_for_override): ... to a new function.
1520         (finish_struct_1): Call it.
1521
1522         * cp-tree.h: Declare warn_sign_compare.
1523
1524         * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
1525         rather than extra_warnings to decide whether to warn about
1526         comparison of signed and unsigned.
1527
1528         * decl2.c (lang_decode_option): Handle warn_sign_compare.  -Wall
1529         implies -Wsign-compare.  -Wall doesn't imply -W.
1530
1531 Wed Feb  7 15:27:57 1996  Mike Stump  <mrs@cygnus.com>
1532
1533         * typeck.c (build_component_ref): Fix to handle anon unions in base
1534         classes as well.
1535
1536 Wed Feb  7 14:29:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
1537
1538         * class.c (resolves_to_fixed_type_p): Delete code dealing with
1539         a WITH_CLEANUP_EXPR, since we don't generate them any more.
1540         * cvt.c (build_up_reference): Likewise.
1541         * decl.c (grok_reference_init): Likewise.
1542         (cp_finish_decl): Likewise.
1543         * error.c (dump_expr): Likewise.
1544         * tree.c (real_lvalue_p): Likewise.
1545         (lvalue_p): Likewise.
1546         (build_cplus_new): Likewise.
1547         (unsave_expr_now): Likewise.
1548         * typeck.c (unary_complex_lvalue, build_modify_expr,
1549         c_expand_return): Likewise.
1550
1551 Tue Feb  6 13:39:22 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
1552
1553         Make the C++ front-end pay attention to attributes for structures.
1554         * class.c (finish_struct): New argument ATTRIBUTES, passed down into
1555         finish_struct_1.
1556         (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
1557         Take out old round_up_size use and setting the DECL_ALIGN possibly
1558         using it.  Take out setting of TYPE_ALIGN to round_up_size, which
1559         can override what the attribute set.
1560         * cp-tree.h (finish_struct): Update prototype.
1561         * parse.y (template_instantiate_once): Pass a NULL_TREE for the
1562         attributes to finish_struct.
1563         (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
1564         value down into finish_struct.
1565         * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
1566
1567 Tue Feb  6 13:12:15 1996  Per Bothner  <bothner@kalessin.cygnus.com>
1568
1569         * decl.c (poplevel):  Re-word dead for local handling.
1570         (pushdecl):  Remove useless DECL_DEAD_FOR_LOCAL test.
1571         (cp_finish_decl):  If is_for_scope, check for duplicates so
1572         we can disable is_for_scope.  Otherwise, preserve_temp_slots.
1573
1574         * lex.c (do_identifier):  Use global binding in preference of
1575         dead for local variable.
1576
1577 Mon Feb  5 17:46:46 1996  Mike Stump  <mrs@cygnus.com>
1578
1579         * init.c (initializing_context): Handle anon union changes, the
1580         context where fields of anon unions can be initialized now has to be
1581         found by walking up the TYPE_CONTEXT chain.
1582
1583 Fri Feb  2 14:54:04 1996  Doug Evans  <dje@charmed.cygnus.com>
1584
1585         * decl.c (start_decl): #ifdef out code to set DECL_COMMON
1586         if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
1587         (obscure_complex_init): If bss is supported, always set
1588         DECL_INITIAL to error_mark_node.
1589
1590 Thu Feb  1 16:19:56 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
1591
1592         * init.c (is_friend): Make sure there's a context before we see if
1593         it's an aggr type.
1594
1595 Thu Feb  1 15:44:53 1996  Mike Stump  <mrs@cygnus.com>
1596
1597         * init.c (is_friend): Classes are not friendly with nested classes.
1598
1599 Thu Feb  1 15:27:37 1996  Doug Evans  <dje@charmed.cygnus.com>
1600
1601         * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
1602         and record its result.
1603
1604 Thu Feb  1 09:27:01 1996  Mike Stump  <mrs@cygnus.com>
1605
1606         * class.c (finish_struct_anon): Switch around code to not move anon
1607         union elements around, nor mess up their contexts, nor offsets,
1608         instead we now build up the right number of COMPONENT_REFs for all
1609         the anon unions that may be present at build_component_ref time.
1610         * typeck.c (lookup_anon_field): New routine to handle field lookup
1611         on fields without names.  We find them, based upon their unique type
1612         instead.
1613         * typeck.c (build_component_ref): Allow FIELD_DECL components.
1614         Handle finding components in anonymous unions, and ensure that a
1615         COMPONENT_REF is built for each level as necessary.
1616
1617 Tue Jan 30 18:18:23 1996  Mike Stump  <mrs@cygnus.com>
1618
1619         * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
1620         code that ensures that copy ctors are used if appropriate.
1621
1622 Tue Jan 30 17:35:14 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
1623
1624         * init.c (build_vec_delete): Only give an error if base isn't an
1625         error_mark_node.
1626
1627 Mon Jan 29 17:09:06 1996  Mike Stump  <mrs@cygnus.com>
1628
1629         * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
1630         (yylex): If we see `new', keep slurping.
1631
1632 Thu Jan 25 18:31:36 1996  Mike Stump  <mrs@cygnus.com>
1633
1634         * class.c (finish_struct_1): Move code for handling anon unions...
1635         (finish_struct_anon): to here.  Fixup so that we do the offset
1636         calculations right, and so that the fields are physically moved to
1637         the containers's chain.
1638
1639 Thu Jan 25 18:27:37 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
1640
1641         * decl.c (grokdeclarator): Avoid trying to get an operand off an
1642         identifier node.
1643
1644 Wed Jan 24 11:25:30 1996  Jim Wilson  <wilson@chestnut.cygnus.com>
1645
1646         * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
1647         POINTER_SIZE to agree with expr.c.
1648
1649 Thu Jan 25 13:01:23 1996  Mike Stump  <mrs@cygnus.com>
1650
1651         * search.c (lookup_field): Don't report ambiguities if protect is 0,
1652         instead return NULL_TREE.
1653
1654 Wed Jan 24 13:01:26 1996  Mike Stump  <mrs@cygnus.com>
1655
1656         * class.c (finish_struct_1): Call warn_hidden if we want warnings
1657         about overloaded virtual functions.
1658         (warn_hidden): New routine to warn of virtual functions that are
1659         hidden by other virtual functions, that are not overridden.
1660         (get_basefndecls): New routine, used by warn_hidden.
1661         (mark_overriders): New routine, used by warn_hidden.
1662         * search.c (get_matching_virtual): Remove old warning that just
1663         isn't very useful.
1664
1665 Tue Jan 23 12:26:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
1666
1667         * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
1668
1669         * typeck.c (null_ptr_cst_p): Delete unused fn.
1670         (build_function_call_maybe): Delete unused fn.
1671
1672         * expr.c (extract_init): #if 0 the code after unconditional return 0
1673         for now.
1674
1675         Delete old cadillac code.
1676         * edsel.c: Remove file.
1677         * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
1678         * Makefile.in (CXX_OBJS): Delete edsel.o.
1679         (edsel.o): Delete rule.
1680         * cp-tree.h (flag_cadillac): Delete var decl.
1681         * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
1682         * decl2.c (flag_cadillac): Delete var definition.
1683         (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
1684         (grokfield): Delete code depending on flag_cadillac.
1685         (finish_anon_union): Likewise.
1686         * class.c (finish_struct_1): Likewise.
1687         (pushclass): Likewise.
1688         (popclass): Likewise.
1689         (push_lang_context): Likewise.
1690         (pop_lang_context): Likewise.
1691         * decl.c (init_decl_processing): Likewise.
1692         (start_decl): Likewise.
1693         (cp_finish_decl): Likewise.
1694         (xref_tag): Likewise.
1695         (finish_enum): Likewise.
1696         (start_function): Likewise.
1697         (finish_function): Likewise.
1698         (finish_stmt): Likewise.
1699         * lex.c (lang_init): Likewise.
1700         (check_newline): Likewise.
1701
1702         * lex.c (do_pending_inlines): Delete synthesized method kludge.
1703
1704         Delete defunct, ancient garbage collection implementation.
1705         * rtti.c: New file with the RTTI stuff from gc.c.
1706         * gc.c: Removed file (moved the remaining stuff into rtti.c).
1707         * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
1708         (rtti.o): New rule, replacing gc.o.
1709         * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
1710         * cp-tree.h: Delete gc-related fn decls.
1711         (DECL_GC_OFFSET): Delete macro.
1712         (flag_gc): Delete extern decl.
1713         * decl.c (current_function_obstack_index): Delete var decl.
1714         (current_function_obstack_usage): Delete var decl.
1715         (start_function): Delete clearing of current_function_obstack_index
1716         and current_function_obstack_usage.
1717         (init_decl_processing): Delete code relying on -fgc.
1718         Delete call to init_gc_processing.
1719         (cp_finish_decl): Delete calls to build_static_gc_entry and
1720         type_needs_gc_entry.  Delete gc code setting DECL_GC_OFFSET.
1721         (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
1722         and to expand_expr of a __gc_main call.
1723         (maybe_gc_cleanup): Delete var decl.
1724         (finish_function): Delete call to expand_gc_prologue_and_epilogue.
1725         * decl2.c (flag_gc): Delete var decl.
1726         (lang_f_options): Delete offering of -fgc.
1727         (lang_decode_option): Delete -fgc and -fno-gc handling.
1728         (get_temp_regvar): Delete gc code.
1729         * init.c (build_new): Delete gc code.
1730         * lex.c (init_lex): Delete checking of flag_gc.
1731
1732         * typeck.c (convert_arguments): Delete gc code.
1733         (build_component_addr): Delete -fgc warning.
1734         (build_modify_expr): Delete gc code.
1735
1736         * decl2.c (build_push_scope): Delete fn.
1737         * cp-tree.h (build_push_scope): Delete decl.
1738
1739         * search.c (clear_search_slots): Delete fn.
1740         * cp-tree.h (clear_search_slots): Delete decl.
1741
1742         * search.c (tree_needs_constructor_p): Delete fn.
1743         * cp-tree.h (tree_needs_constructor_p): Delete decl.
1744
1745         * tree.c (id_cmp): Delete fn.
1746
1747         * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
1748         * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
1749
1750         * tree.c (decl_value_member): Delete fn.
1751         * cp-tree.h (decl_value_member): Delete decl.
1752
1753         * tree.c (list_hash_lookup_or_cons): Delete fn.
1754         * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
1755
1756         * method.c (cplus_exception_name): Delete fn.
1757         (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
1758
1759         * spew.c (shift_tokens): Delete fn.
1760
1761 Mon Jan 22 17:49:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
1762
1763         * except.c (init_exception_processing): Pass 1 to needs_pop in calls
1764         to cp_finish_decl.
1765         * parse.y: Ditto.
1766
1767 Mon Jan 22 17:34:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
1768
1769         * tree.c (build_cplus_staticfn_type): Delete function definition;
1770         never used.
1771         * cp-tree.h (build_cplus_staticfn_type): Delete decl.
1772
1773         * tree.c (virtual_member): Delete function definition; never used.
1774         * cp-tree.h (virtual_member): Delete decl.
1775
1776 Fri Jan 19 18:03:14 1996  Mike Stump  <mrs@cygnus.com>
1777
1778         * typeck.c (build_component_ref): Handle getting vbase pointers
1779         out of complex multiple inheritance better.
1780
1781 Fri Jan 19 16:27:40 1996  Mike Stump  <mrs@cygnus.com>
1782
1783         * typeck.c (build_object_ref): Make sure we use the real type, not
1784         any reference type.
1785
1786 Fri Jan 19 16:01:47 1996  Mike Stump  <mrs@cygnus.com>
1787
1788         * tree.c (build_exception_variant): Don't create new types if we
1789         don't have to, also build new types on the right obstack.
1790
1791 Fri Jan 19 14:09:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
1792
1793         * decl.c (store_bindings): Split out from push_to_top_level.
1794         (push_to_top_level): Call it for b->type_shadowed on class binding
1795         levels.
1796
1797 Fri Jan 19 13:53:14 1996  Mike Stump  <mrs@cygnus.com>
1798
1799         * search.c (expand_upcast_fixups): Fix so that offsets stored in
1800         vbase_offsets are always right.  Fixes a problem where virtual base
1801         upcasting and downcasting could be wrong during conversions on this
1802         during virtual function dispatch at ctor/dtor time when dynamic
1803         vtable fixups for deltas are needed.  This only sounds easier than
1804         it is.  :-)
1805         (fixup_virtual_upcast_offsets): Change to reflect new calling
1806         convention for expand_upcast_fixups.
1807
1808 Fri Jan 19 12:23:08 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
1809
1810         * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
1811         check that it's usable as the bitfield width.
1812
1813 Wed Jan 17 21:22:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
1814
1815         * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
1816         Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
1817         only ever used for functions in it.
1818
1819 Wed Jan 17 12:10:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
1820
1821         * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
1822         (nested_type): Ditto.
1823         (nested_name_specifier): Use lastiddecl.
1824
1825         * decl.c (grokdeclarator): Adjust accordingly.
1826         * init.c (expand_member_init): Ditto.
1827         * parse.y (base_class): Ditto.
1828         * typeck2.c (build_functional_cast): Ditto.
1829
1830         * typeck2.c (build_functional_cast): Fill in name after we've
1831         checked for non-aggr type.
1832
1833 Wed Jan 17 10:18:01 1996  Mike Stump  <mrs@cygnus.com>
1834
1835         * decl2.c (warn_pointer_arith): Default to on.
1836
1837 Tue Jan 16 12:45:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
1838
1839         * lex.c (is_rid): New function.
1840         * decl.c (grokdeclarator): Diagnose reserved words used as
1841         declarator-ids.
1842
1843 Tue Jan 16 11:39:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
1844
1845         * tree.c (get_decl_list): Don't lose cv-quals.
1846
1847         * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
1848         typespecs used as declarator-ids.
1849
1850 Tue Jan 16 11:09:42 1996  Mike Stump  <mrs@cygnus.com>
1851
1852         * decl.c (poplevel): When poping a level, don't give a warning for
1853         any subblocks that already exist.
1854
1855 Tue Jan 16 00:25:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
1856
1857         * typeck.c (build_object_ref): Finish what I started.
1858
1859         * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
1860
1861         * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
1862
1863         * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
1864         scope.
1865
1866 Mon Jan 15 16:19:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
1867
1868         * decl.c (xref_tag): Handle passing a type in directly.
1869
1870         * parse.y (qualified_type_name): Pull out the type.
1871         (nested_type): Ditto.
1872         Take types directly instead of as identifiers.
1873         * call.c (build_scoped_method_call): Take types directly instead of
1874         as identifiers.
1875         * decl.c (xref_basetypes): Ditto.
1876         * init.c (expand_member_init): Ditto.
1877         (build_member_call): Ditto.
1878         (build_offset_ref): Ditto.
1879         * typeck2.c (build_scoped_ref): Ditto, remove bogus code.
1880         * method.c (do_build_assign_ref): Ditto.
1881         * decl.c (grokdeclarator): Handle a type appearing as the
1882         declarator-id for constructors.
1883         * method.c (do_build_copy_constructor): current_base_init_list now
1884         uses the types directly, not their names.
1885         * init.c (sort_base_init): Ditto.
1886         (expand_member_init): Ditto.
1887         * init.c (is_aggr_type): New function, like is_aggr_typedef.
1888
1889 Mon Jan 15 08:45:01 1996  Jeffrey A Law  (law@cygnus.com)
1890
1891         * tree.c (layout_basetypes): Call build_lang_field_decl instead
1892         of build_lang_decl if first arg is a FIELD_DECL.
1893         (tree_copy_lang_decl_for_deferred_output): Reverse test for when
1894         to copy DECL_MAIN_VARIANT and DECL_CHAIN.
1895
1896 Thu Jan 11 14:55:07 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
1897
1898         * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
1899         non-empty.
1900         * except.c (expand_start_catch_block): Set TREE_USED to avoid
1901         warnings about the catch handler.
1902
1903 Mon Jan  8 17:35:12 1996  Jason Merrill  <jason@yorick.cygnus.com>
1904
1905         * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
1906         expand_target_expr.
1907
1908 Thu Jan  4 12:30:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
1909
1910         Fix access control to use trees rather than integers.
1911         * class.c (access_{default, public, protected, private,
1912         default_virtual, public_virtual, private_virtual}_node): Add
1913         definitions.
1914         (init_class_processing): Do creation of those nodes.
1915         * cp-tree.h (access_type): Delete enum decl.
1916         (access_{default, public, protected, private, default_virtual,
1917         public_virtual, private_virtual}_node): Add decls.
1918         (compute_access): Change return type.
1919         * search.c (compute_access): Have tree return type, instead of enum.
1920         (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
1921         * lex.c (real_yylex): Use yylval.ttype for giving the value of the
1922         access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
1923         * parse.y (VISSPEC): Make ttype rather than itype.
1924         (base_class_access_list): Likewise.
1925         * *.[cy]: Change all refs of `access_public' to `access_public_node',
1926         etc.
1927         * call.c (build_method_call): Make ACCESS be a tree.
1928         * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
1929         * cvt.c (convert_to_aggr): Likewise.
1930         * init.c (build_offset_ref, resolve_offset_ref, build_delete):
1931         Likewise.
1932         * method.c (hack_identifier): Likewise.
1933         * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
1934
1935 Thu Jan  4 11:02:20 1996  Mike Stump  <mrs@cygnus.com>
1936
1937         * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
1938         frontend, and make it more consistent with respect to
1939         warn_pointer_arith.
1940
1941 Tue Jan  2 00:13:38 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
1942
1943         * decl.c (pushdecl): Check for duplicate parameter names.
1944
1945 Wed Jan  3 09:25:48 1996  Mike Stump  <mrs@cygnus.com>
1946
1947         * decl.c (expand_static_init): Call assemble_external for atexit.
1948
1949 Wed Jan  3 07:55:19 1996  Mike Stump  <mrs@cygnus.com>
1950
1951         * except.c (do_unwind): Remove some generated dead code.
1952         (eh_outer_context): New routine, factor out some common code from
1953         expand_builtin_throw and end_eh_unwinder.  Add code to do return
1954         address masking for the PA.
1955         (expand_builtin_throw): Use eh_outer_context instead of open coding
1956         it here.
1957         (end_eh_unwinder): Ditto.
1958
1959 Tue Jan  2 17:00:56 1996  Mike Stump  <mrs@cygnus.com>
1960
1961         * except.c (expand_throw): Call assemble_external for __empty, if we
1962         use it.
1963
1964 Thu Dec 28 11:13:15 1995  Mike Stump  <mrs@cygnus.com>
1965
1966         * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
1967         NORMAL_RETURN_ADDR_OFFSET.
1968         (end_eh_unwinder): Ditto.
1969
1970 Wed Dec 27 22:18:16 1995  Mike Stump  <mrs@cygnus.com>
1971
1972         * gc.c (build_dynamic_cast): Make sure we don't cast away const
1973         when dealing with references, and make sure we handle dynamic
1974         casting to a cv qualified reference.
1975
1976 Thu Dec 21 23:50:35 1995  Mike Stump  <mrs@cygnus.com>
1977
1978         * except.c (struct eh_context): New structure top hold eh context
1979         information.
1980         (push_eh_context): New routine.
1981         (pop_eh_context): Ditto.
1982         * decl.c (push_cp_function_context): Use them.
1983         (pop_cp_function_context): Ditto.
1984
1985 Wed Dec 20 12:42:51 1995  Jason Merrill  <jason@yorick.cygnus.com>
1986
1987         * decl2.c (finish_file): Also prune uninteresting functions in the
1988         inline emission loop.
1989
1990 Wed Dec 20 02:32:07 1995  Jeffrey A Law  (law@cygnus.com)
1991
1992         * sig.c (build_signature_table_constructor): Mark functions
1993         in the signature as referenced.
1994
1995 Tue Dec 19 22:36:56 1995  Jason Merrill  <jason@yorick.cygnus.com>
1996
1997         * decl2.c (finish_file): Do all the vtable/synthesis stuff before
1998         the inline emission stuff.
1999
2000 Mon Dec 18 15:51:33 1995  Jason Merrill  <jason@yorick.cygnus.com>
2001
2002         * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
2003         weak symbols.   
2004         * lang-options.h: Add -f{no-,}weak.
2005         * decl.c (init_decl_processing): If the target does not support weak
2006         symbols, don't use them.
2007         * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
2008
2009 Sun Dec 17 21:13:23 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
2010
2011         * init.c (expand_member_init): warning for base init after members.
2012
2013 Sun Dec 17 22:06:56 1995  Jeffrey A Law  (law@cygnus.com)
2014
2015         * tree.c (tree_copy_lang_decl_for_deferred_output): Handle
2016         CONST_DECLs correctly.
2017
2018 Fri Dec 15 15:32:18 1995  Jason Merrill  <jason@yorick.cygnus.com>
2019
2020         * cvt.c (build_expr_type_conversion): Don't convert to a reference
2021         type.
2022
2023 Thu Dec 14 16:05:58 1995  Mike Stump  <mrs@cygnus.com>
2024
2025         * method.c (report_type_mismatch): Improve wording for volatile
2026         mismatches.
2027
2028 Thu Dec 14 14:16:26 1995  Mike Stump  <mrs@cygnus.com>
2029
2030         * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
2031         expand_assignment, as the later doesn't handle things that have
2032         copy constructors well.  The compiler would do bitwise copying,
2033         instead of ctor calling in some cases.
2034
2035 Wed Dec 13 17:05:54 PST 1995  Paul Eggert  <eggert@twinsun.com>
2036
2037         * g++.c (my_strerror): Return "cannot access" if errno is 0.
2038         (pfatal_with_name, perror_exec): Don't assume that
2039         the returned value from my_strerror contains no '%'s.
2040         (concat): Remove.
2041         (sys_nerror): Declare only if HAVE_STRERROR is not defined.
2042
2043 Wed Dec 13 16:22:38 1995  Jason Merrill  <jason@yorick.cygnus.com>
2044
2045         Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
2046         TYPE_METHODS/TREE_CHAIN mean what they used to. 
2047         * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
2048         instead of TYPE_METHODS.
2049         * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
2050         * tree.c (tree_copy_lang_decl_for_deferred_output): Ditto.
2051         * cp-tree.h (CLASSTYPE_METHODS): Lose.
2052         (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
2053         TYPE_METHODS.
2054         (struct lang_decl): Lose next_method field.
2055         (DECL_NEXT_METHOD): Lose.
2056         * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
2057         (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
2058         anymore.
2059         (finish_struct_methods): Don't mess with the TREE_CHAINs in
2060         fn_fields.
2061
2062         * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
2063         vector.
2064
2065         * call.c (build_method_call): Synthesize here even when not inlining.
2066         * typeck.c (build_function_call_real): Ditto.
2067
2068 Wed Dec 13 15:02:39 1995  Ian Lance Taylor  <ian@cygnus.com>
2069
2070         * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
2071         == DBX_DEBUG, call dbxout_start_new_source_file and
2072         dbxout_resume_previous_source_file when appropriate.
2073
2074 Tue Dec 12 20:38:55 1995  Mike Stump  <mrs@cygnus.com>
2075
2076         * except.c (start_anon_func): Push to the top level.
2077         (end_anon_func): Pop from the top level.
2078
2079 Mon Dec 11 18:56:14 1995  Mike Stump  <mrs@cygnus.com>
2080
2081         * cp-tree.h (build_cleanup): New routine to build cleanups.
2082         * decl.c (expand_static_init): Use build_cleanup to build a cleanup
2083         call at ctor time and use atexit to run it later.
2084         * decl2.c (build_cleanup): New routine, taken from finish_file.
2085         (finish_file): Use build_cleanup instead, and don't put function
2086         local statics in global dtor list.
2087         
2088 Wed Dec  6 14:34:29 1995  Mike Stump  <mrs@cygnus.com>
2089
2090         * except.c (expand_throw): Ensure that we have cleanups, if we try
2091         and expand cleanups.
2092
2093 Wed Dec  6 11:48:21 1995  Mike Stump  <mrs@cygnus.com>
2094
2095         * except.c (expand_throw): Add logic to manage dynamic cleanups for
2096         the EH object.
2097         (expand_end_catch_block): Use the magic of expand_goto, instead of
2098         emit_jump so that we get the cleanup for any catch clause parameter
2099         and the cleanup for the exception object.  Update to reflect label
2100         changes.
2101         (push_eh_cleanup): New routine to register a cleanup for an
2102         exception object.
2103         (empty_fndecl): Used to default cleanup actions to
2104         nothing.
2105         (init_exception_processing): Setup empty_fndecl.  Setup
2106         saved_cleanup.
2107         (expand_start_catch_block): Update to reflect label changes.  Call
2108         push_eh_object to register the cleanup for the EH object.
2109         (start_anon_func): New routine to start building lambda expressions
2110         from trees.
2111         (end_anon_func): New routine to end them.
2112         (struct labelNode): Change so that we can use tree labels, or rtx
2113         labels.
2114         (saved_cleanup): Object to check for dynamic cleanups for the
2115         exception handling object.
2116         (push_label_entry): Change so that we can use tree labels, or rtx
2117         labels.
2118         (pop_label_entry): Ditto.
2119         (top_label_entry): Ditto.
2120         (expand_start_all_catch): Use tree label instead of rtx label, so
2121         that we can get the magic of expand_goto.
2122         (expand_end_all_catch): Update to reflect label changes.
2123
2124         * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
2125         use UNSAVE_EXPRs.
2126         typeck.c (get_member_function_from_ptrfunc): Remove remnants of
2127         building_cleanup logic, as we now use UNSAVE_EXPRs.
2128         * cp-tree.h (unsave_expr): Declare it.
2129         * decl.c (building_cleanup): Remove.
2130         (maybe_build_cleanup): Remove building_cleanup logic, and use
2131         UNSAVE_EXPR instead.
2132
2133 Sun Dec  3 01:34:58 1995  Mike Stump  <mrs@cygnus.com>
2134
2135         * gc.c (build_t_desc): Update error message to say <typeinfo>.
2136
2137 Thu Nov 30 12:30:05 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
2138
2139         * decl.c (pushdecl): Only warn about shadowing a local variable if
2140         warn_shadow is true.
2141
2142 Sun Nov 26 16:06:55 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
2143
2144         * typeck.c (build_binary_op_nodefault): Added warning about
2145         comparisons between different enum types with -Wall, unless
2146         -fenum-int-equiv set.
2147
2148 Wed Nov 22 15:44:02 1995  Mike Stump  <mrs@cygnus.com>
2149
2150         * class.c (finish_struct_1): Skip down to the inner type in
2151         multidimensional arrays.  Ensures ctors will be made for types that
2152         need constructing.
2153
2154 Wed Nov 22 14:19:22 1995  Mike Stump  <mrs@cygnus.com>
2155
2156         * decl.c (last_dtor_insn): New to track the last compiler generated
2157         insn in a dtor.
2158         (store_parm_decls): Set it.
2159         (finish_function): Use it to see if the dtor is empty.  Avoid doing
2160         vtable setup all the time, if we can.
2161         (struct cp_function): Add last_dtor_insn.
2162         (push_cp_function_context): Save it.
2163         (pop_cp_function_context): Restore it.
2164
2165 Wed Nov 22 11:52:19 1995  Paul Russell  <Rusty.Russell@adelaide.maptek.com.au>
2166
2167         * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
2168         warnings.
2169
2170 Tue Nov 21 17:15:23 1995  Mike Stump  <mrs@cygnus.com>
2171
2172         * typeck.c (expand_target_expr): Make sure targets get put into the
2173         current temp_slot_level, so that the free_temp_slots call will reuse
2174         them.
2175
2176 Tue Nov 21 13:32:03 1995  Mike Stump  <mrs@cygnus.com>
2177
2178         * class.c (finish_struct_1): Delay delta fixups for virtual bases
2179         until after we have done the hard virtuals, to avoid a bogus `every
2180         virtual function must have a unique final overrider' for virtual
2181         functions that are only overridden by hard virtuals.
2182
2183 Thu Nov  9 13:35:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
2184
2185         * pt.c (do_function_instantiation): Don't try to find a file-scope
2186         template for a member function.
2187
2188 Tue Nov 14 06:20:35 1995  Mike Stump  <mrs@cygnus.com>
2189
2190         * g++.c (main): Add handling of -nodefaultlibs.
2191
2192 Mon Nov 13 15:45:34 1995  Mike Stump  <mrs@cygnus.com>
2193
2194         * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
2195         distinguish between direct bindings of reference variables, and
2196         indirect bindings of reference variables.
2197         * cvt.c (build_up_reference): Use it.
2198         * typeck.c (convert_arguments): Use it to indicate this is an
2199         indirect binding.
2200         * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
2201         as they are unused.
2202         (expand_static_init): Diotto.
2203         (cplus_expand_expr_stmt): Ditto.
2204         * decl2.c (finish_file): Ditto.
2205         * init.c (perform_member_init): Ditto.
2206         (emit_base_init): Ditto.
2207         (expand_aggr_vbase_init_1): Ditto.
2208
2209 Fri Nov 10 09:19:31 1995  Jeffrey A Law  (law@cygnus.com)
2210
2211         * tree.c (tree_copy_lang_decl_for_deferred_output): Handle
2212         copying of DECL_ARGUMENTS field.
2213         (tree_copy_lang_type_for_deferred_output): Handle disgusting
2214         re-use of TYPE_LANG_SPECIFIC for pointer to member function
2215         type nodes.
2216
2217 Fri Nov 10 09:18:09 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
2218
2219         * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
2220         get a DECL_LANG_SPECIFIC node.
2221         * cp-tree.h (lang_decl_flags): Add new member `level'.
2222         (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
2223         decl_flags level member.
2224
2225 Mon Nov  6 18:36:13 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
2226
2227         * call.c (build_method_call): Make sure instance has a
2228         TYPE_LANG_SPECIFIC node before we dive into it.  
2229
2230 Sat Nov  4 20:01:52 1995  Jason Molenda  (crash@phydeaux.cygnus.com)
2231
2232         * method.c (make_thunk): use TREE_SET_CODE to set thunk's tree code.
2233
2234 Thu Nov  2 17:56:57 1995  Mike Stump  <mrs@cygnus.com>
2235
2236         * decl.c (duplicate_decls): When smashing decls, smash staticness in
2237         the usual way.
2238
2239 Thu Nov  2 16:44:02 1995  Mike Stump  <mrs@cygnus.com>
2240
2241         * decl.c (poplevel): Handle the merging of subblocks of cleanups
2242         when finishing blocks that have already been created (usually due to
2243         the fixup goto code).  Fixes bad debugging information.
2244
2245 Wed Nov  1 12:33:53 1995  Jason Merrill  <jason@yorick.cygnus.com>
2246
2247         * method.c (hack_identifier): Don't abort when we get a TREE_LIST
2248         that's not a list of overloaded functions.
2249
2250 Wed Nov  1 11:38:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
2251
2252         * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
2253         before trying to use DECL_ABSTRACT_VIRTUAL_P.
2254
2255 Tue Oct 31 11:56:55 1995  Jason Merrill  <jason@yorick.cygnus.com>
2256
2257         * decl2.c (mark_used): New function for hooking into setting of
2258         TREE_USED on decls.
2259         * call.c (build_method_call): Use it.
2260         * class.c (instantiate_type): Ditto.
2261         * init.c (build_offset_ref): Ditto.  Don't call assemble_external
2262         for all like-named functions.
2263         * method.c (hack_identifier): Ditto.
2264         (emit_thunk): Don't call assemble_external.
2265         (make_thunk): Create thunk as a FUNCTION_DECL so that it
2266         gets the right mode and ENCODE_SECTION_INFO works.
2267         
2268         * parse.y: Use mark_used.  Pass operator names to do_identifier.
2269         * lex.c (do_identifier): Handle operator names.
2270
2271         * decl2.c (grokclassfn): Tweak __in_chrg attributes.
2272
2273 Thu Oct 26 20:58:59 1995  Jeffrey A Law  (law@cygnus.com)
2274
2275         * cp/tree.c (tree_copy_lang_decl_for_deferred_output): Handle
2276         FIELD_DECLs and VAR_DECLs correctly.
2277
2278 Thu Oct 26 16:45:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
2279
2280         * errfn.c: Include stdio.h.
2281         (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
2282
2283 Wed Oct 25 18:58:41 1995  Mike Stump  <mrs@cygnus.com>
2284
2285         * typeck2.c (digest_init): Always convert initializers to the
2286         right type.
2287
2288 Wed Oct 25 13:25:24 1995  Mike Stump  <mrs@cygnus.com>
2289
2290         * init.c (member_init_ok_or_else): Don't allow member initializers
2291         for indirect members, as it is invalid.
2292
2293 Wed Oct 25 11:35:28 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
2294
2295         * decl.c (grokdeclarator): Don't allow `friend signed ()'.
2296
2297 Fri Oct 20 10:30:59 1995  Mike Stump  <mrs@cygnus.com>
2298
2299         * parse.y (for.init.statement): Catch compound statements inside for
2300         initializations, if we're being pedantic.
2301
2302 Fri Oct 20 10:03:42 1995  Mike Stump  <mrs@cygnus.com>
2303
2304         * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
2305         looking for.
2306
2307 Thu Oct 19 14:26:10 1995  Mike Stump  <mrs@cygnus.com>
2308
2309         * error.c (dump_expr): Don't core dump when a boolean expression is
2310         used as a default argument.
2311
2312 Thu Oct 19 10:36:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
2313
2314         * class.c (finish_struct_bits): Check aggregate_value_p instead of
2315         RETURN_IN_MEMORY.
2316
2317 Wed Oct 18 18:12:32 1995  Jason Merrill  <jason@yorick.cygnus.com>
2318
2319         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
2320         BLKmode type that would otherwise be returned in registers.
2321
2322 Mon Oct 16 12:32:19 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
2323
2324         * g++.c (WITHLIBC): New macro.
2325         (main): Declare saw_libc.  Use WITHLIBC if `-lc' was used; set
2326         saw_libc and pass it at the end if it was set.
2327
2328 Wed Oct 11 16:30:34 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
2329
2330         * parse.y (fn.def1): Call split_specs_attrs in
2331         declmods notype_declarator case.
2332
2333 Sun Nov 26 14:47:42 1995  Richard Kenner  <kenner@mole.gnu.ai.mit.edu>
2334
2335         * Version 2.7.2 released.
2336
2337 Mon Nov 20 14:05:00 1995  Mike Stump  <mrs@cygnus.com>
2338
2339         * g++.c (pfatal_with_name): Add missing third argument to concat.
2340
2341 Thu Oct 26 13:59:54 1995  Mike Stump  <mrs@cygnus.com>
2342
2343         * init.c (expand_aggr_init): Handle cv qualifiers on the object's
2344         type.
2345
2346 Sat Nov 11 08:25:55 1995  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2347
2348         * Version 2.7.1 released.
2349
2350 Thu Nov  2 17:02:47 1995  Jason Merrill  <jason@yorick.cygnus.com>
2351
2352         * call.c (convert_harshness): Handle references to arrays.
2353
2354 Fri Oct 27 14:20:21 1995  Jason Merrill  <jason@yorick.cygnus.com>
2355
2356         * typeck.c (comp_target_types): Check multi-level pointer
2357         conversions in both directions.
2358
2359 Tue Oct 17 21:39:05 1995  Jason Merrill  <jason@yorick.cygnus.com>
2360
2361         * parse.y (explicit_instantiation): Fix 'extern template' with no
2362         return type.
2363
2364 Mon Oct 16 14:35:20 1995  Jason Merrill  <jason@yorick.cygnus.com>
2365
2366         * parse.y (explicit_instantiation): Support automatic instantiation
2367         of constructors.
2368         (named_class_head_*): Support out-of-class definition of nested
2369         types.
2370
2371 Wed Oct 11 12:20:56 1995  Mike Stump  <mrs@cygnus.com>
2372
2373         * search.c (envelope_add_decl): New routine.  Fix so that
2374         methods are hidden in the same way that other members are.
2375         (dfs_pushdecls): Cleanup and move functionality out of line,
2376         into envelope_add_decl. 
2377
2378 Tue Oct 10 15:46:01 1995  Mike Stump  <mrs@cygnus.com>
2379
2380         * typeck.c (mark_addressable): Only call assemble_external if we
2381         have started the output file.
2382
2383 Tue Oct 10 11:27:18 1995  Jason Merrill  <jason@yorick.cygnus.com>
2384
2385         * decl.c (start_function): Fix earlier cv-quals change.
2386
2387 Mon Oct  9 23:53:05 1995  Mike Stump  <mrs@cygnus.com>
2388
2389         * parse.y (complex_direct_notype_declarator): Only push the class if
2390         we are not already in the class.
2391
2392 Mon Oct  9 11:22:03 1995  Doug Evans  <dje@canuck.cygnus.com>
2393
2394         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
2395         Update olddecl's attributes too.
2396         (grokdeclarator): #if 0 out call to build_decl_attribute_variant.
2397         * typeck.c (common_type): Call merge_machine_type_attributes.
2398
2399 Fri Oct  6 14:44:27 1995  Mike Stump  <mrs@cygnus.com>
2400
2401         * typeck.c (mark_addressable): Add missing call to
2402         assemble_external.
2403
2404 Wed Oct  4 22:05:23 1995  Jeff Law  (law@hurl.cygnus.com
2405
2406         * cp/decl.c (deplicate_decls): Merge in deferred output
2407         status for variables.
2408         * cp/tree.c (tree_copy_lang_decl_for_deferred_output): New
2409         function to copy the g++ specific parts of a DECL node.
2410         (tree_copy_lang_type_for_deferred_output): Similarly for
2411         TYPE nodes.
2412
2413 Wed Oct  4 15:06:39 1995  Mike Stump  <mrs@cygnus.com>
2414
2415         * decl.c (store_parm_decls): Make sure the unwinder start comes
2416         before the exception specification start.
2417         * except.c (expand_exception_blocks): Make sure the unwinder end
2418         comes after the terminate protected catch clause region and after
2419         the end of the exception specification region.
2420
2421 Wed Oct  4 12:47:02 1995  Jason Merrill  <jason@yorick.cygnus.com>
2422
2423         * lex.c (real_yylex): Fix identifier case for linemode.
2424         (handle_sysv_pragma): Don't abort when we see a pragma we don't
2425         recognize.
2426
2427 Tue Oct  3 14:09:46 1995  Mike Stump  <mrs@cygnus.com>
2428
2429         * decl.c (store_parm_decls): Add a call to start_eh_unwinder.
2430         * except.c (init_exception_processing): __throw doesn't take any
2431         arguments.
2432         (expand_builtin_throw): Ditto.  Always use Pmode, instead of SImode
2433         for all pointers.  Use expand_builtin_return_addr to unwind the
2434         first level off the stack.
2435         (do_unwind): Always use Pmode, instead of SImode for all pointers.
2436         (expand_exception_blocks): Add a call to end_eh_unwinder.
2437         (start_eh_unwinder, end_eh_unwinder): New routines to build machine
2438         independent stack unwinders for function/method calls.
2439         
2440 Mon Oct  2 17:20:42 1995  Mike Stump  <mrs@cygnus.com>
2441
2442         * tree.c (unsave_expr_now): Make sure we process the argument list
2443         of any called functions.  Fixes incorrect code generation for
2444         cleanups.
2445
2446 Mon Oct  2 13:04:16 1995  Mike Stump  <mrs@cygnus.com>
2447
2448         * typeck.c (get_member_function_from_ptrfunc): Save function if it
2449         needs it.  Cures core dump on things like (this->*(f()))().
2450
2451 Sat Sep 23 22:51:25 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2452
2453         * decl.c (start_function): Conform to gcc cv-quals convention (no
2454         expression has a cv-qualified type) in RESULT_DECLs.
2455         * method.c (make_thunk): Ditto.
2456
2457 Fri Sep 22 10:21:13 1995  Mike Stump  <mrs@cygnus.com>
2458
2459         * decl.c (pushtag): Add in the namespace name for the tag.
2460
2461 Thu Sep 21 13:11:13 1995  Mike Stump  <mrs@cygnus.com>
2462
2463         * parse.y (maybe_base_class_list, base_class_list, base_class,
2464         base_class_access_list): Make sure we see the typenames for base
2465         classes.
2466         * lex.c (see_typename): Instead of failing to see a typename when
2467         there is no next token, perfer a typename, and get the next token.
2468
2469 Wed Sep 20 12:35:27 1995  Michael Meissner  <meissner@cygnus.com>
2470
2471         * decl.c (init_decl_processing): Add __builtin_expect.
2472
2473 Tue Sep 19 16:48:11 1995  Mike Stump  <mrs@cygnus.com>
2474
2475         * cvt.c (cp_convert_to_pointer): Don't allow leftover conversions to
2476         or from pointer to member functions, they must all be handled before
2477         this point.
2478
2479 Fri Sep 15 17:14:47 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
2480
2481         * init.c (resolve_offset_ref): Fix wording of non-static member
2482         being referenced as a static.
2483
2484 Fri Sep 15 12:39:11 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2485
2486         * typeck.c (build_indirect_ref): Only bash pointer if we actually
2487         call build_expr_type_conversion.
2488
2489 Thu Sep 14 18:24:56 1995  Jason Merrill  <jason@deneb.cygnus.com>
2490
2491         * cvt.c (build_expr_type_conversion): Handle conversion from
2492         reference.
2493         * typeck.c (build_indirect_ref): Avoid infinite recursion.
2494
2495 Thu Sep 14 17:23:28 1995  Mike Stump  <mrs@cygnus.com>
2496
2497         * decl.c (expand_start_early_try_stmts): New routine to start a try
2498         block at the start of the function, for function-try-blocks.
2499         * cp-tree.h (expand_start_early_try_stmts): Declare it.
2500         * parse.y (function_try_block): Use it, instead of doing it here, as
2501         we don't want to include rtl.h here, as that conflicts with RETURN
2502         in the parser.
2503
2504 Wed Sep 13 18:32:24 1995  Mike Stump  <mrs@cygnus.com>
2505
2506         * lex.c (reinit_parse_for_block): Support saving inline
2507         function-try-blocks, uses peekyylex.
2508         * parse.y (eat_saved_input): New rule, permit the parser to see that
2509         END_OF_SAVED_INPUT is ok, as it can see this when parsing the
2510         handlers of a function-try-block.
2511         (fndef): Use it.
2512         (component_decl): Make sure TRY and RETURN can come after fn.def2.
2513         * spew.c (peekyylex): New routine to peek at what will come next.
2514
2515 Wed Sep 13 16:52:06 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2516
2517         * typeck.c (comptypes): Tighten up comparisons of template type
2518         parms.
2519
2520         * decl.c (duplicate_decls): Turn off whining about virtual functions
2521         redeclared inline for now.
2522
2523 Wed Sep 13 11:13:40 1995  Mike Stump  <mrs@cygnus.com>
2524
2525         * decl.c (store_in_parms): New routine to put things before we
2526         put base inits.
2527         * cp-tree.h (store_in_parms): Declare it.
2528         * decl.c (store_parm_decls): Use it to makr sure the starting of the
2529         eh spec comes before base inits.
2530         (finish_function): Use sequences instead of the obsolete
2531         reorder_insns.
2532         * parse.y (fndef): Enhance readability and maintainability.  Update
2533         to include function_try_block syntax.
2534         (function_try_block): Add.
2535
2536 Tue Sep 12 17:43:07 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
2537
2538         * call.c (convert_harshness): Use comptypes, not ==, to check if
2539         TYPE and PARMTYPE are equivalent on a function type.
2540
2541 Tue Sep 12 17:31:33 1995  Douglas Rupp  (drupp@cs.washington.edu)
2542
2543         * Make-lang.in (cc1plus) : Removed unnecessary $(exeext).
2544
2545 Mon Sep 11 23:24:07 1995  Mike Stump  <mrs@cygnus.com>
2546
2547         * except.c (expand_throw): Never allocate storage for thrown pointer
2548         to objects.
2549
2550 Mon Sep 11 19:36:45 1995  Mike Stump  <mrs@cygnus.com>
2551
2552         * except.c (expand_start_catch_block): Pointers to objects come
2553         back from catch matching already dereferenced, don't dereference
2554         again.
2555
2556 Mon Sep 11 15:46:28 1995  Mike Stump  <mrs@cygnus.com>
2557
2558         * except.c (expand_throw): Only decay the throw expression, don't do
2559         any default conversions.  This is so that one can throw and catch
2560         characters, and not have them match integers.
2561
2562 Mon Sep 11 13:46:45 1995  Mike Stump  <mrs@cygnus.com>
2563
2564         * error.c (dump_aggr_type): Deal with anonymous unions that don't
2565         have a TYPE_NAME.
2566
2567 Fri Sep  8 20:40:27 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
2568
2569         * lex.c (handle_sysv_pragma): Deal with getting a comma from yylex.
2570
2571 Fri Sep  8 15:51:41 1995  Mike Stump  <mrs@cygnus.com>
2572
2573         * except.c (expand_end_eh_spec): Handle empty EH specifications.
2574
2575 Fri Sep  8 15:27:22 1995  Mike Stump  <mrs@cygnus.com>
2576
2577         * cp-tree.h (expand_start_eh_spec): Declare new routine.
2578         (expand_end_eh_spec): Ditto.
2579         * decl.c (store_parm_decls): Call expand_start_eh_spec to process
2580         exception specifications.
2581         * except.c (expand_leftover_cleanups): Remove unused parameter.
2582         (expand_end_catch_block): Ditto.
2583         (expand_exception_blocks): Ditto.
2584         (expand_start_eh_spec): New routine to mark the start of an
2585         exception specification region.
2586         (expand_end_eh_spec): New routine to mark the end of an exception
2587         specification region.
2588         (expand_exception_blocks): Call expand_end_eh_spec to process
2589         exception specifications.
2590
2591 Fri Sep  8 14:40:48 1995  Per Bothner  <bothner@kalessin.cygnus.com>
2592
2593         * lex.c (do_identifier):  Use global binding in preference of
2594         dead for local variable.
2595
2596 Wed Sep  6 19:32:59 1995  Mike Stump  <mrs@cygnus.com>
2597
2598         * cp-tree.h (build_exception_variant): Remove used first argument.
2599         * decl.c (duplicate_decls): Ditto.
2600         (grokfndecl): Ditto.
2601         (revert_static_member_fn): Ditto.
2602         * decl2.c (grok_method_quals): Ditto.
2603         * tree.c (build_exception_variant): Ditto.
2604         * typeck.c (common_type): Ditto.
2605         * decl2.c (grokclassfn): After changing the type, call
2606         build_exception_variant, if necessary.
2607
2608 Tue Sep  5 15:56:27 1995  Mike Stump  <mrs@cygnus.com>
2609
2610         * except.c (expand_throw): Run cleanups for the throw expression.
2611
2612 Wed Aug 30 15:24:38 1995  Stephen L. Favor  (sfavor@tigger.intecom.com)
2613
2614         * except.c (expand_builtin_throw): Moved gen_label_rtx calls beyond
2615         the store_parm_decls call which does initialization in the emit_*
2616         code concerning label numbering.
2617         
2618 Thu Aug 31 09:01:07 1995  Mike Stump  <mrs@cygnus.com>
2619
2620         * except.c (expand_internal_throw): Let the frontend be responsible
2621         for managing all frontend EH parameters, the backend routine only
2622         needs to deal with backend values.  type and value are no longer
2623         passed to __throw.
2624         (init_exception_processing): Ditto.
2625         (expand_start_all_catch): Ditto.
2626         (expand_end_all_catch): Ditto.
2627         (expand_leftover_cleanups): Ditto.
2628         (expand_end_catch_block): Ditto.
2629         (expand_builtin_throw): Ditto.
2630         (expand_throw): Ditto.
2631         
2632 Tue Aug 29 15:04:36 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2633
2634         * cp-tree.h (DECL_REAL_CONTEXT): Give the real declaration context
2635         for a decl.
2636         * decl.c (cp_finish_decl): Use it.
2637
2638 Tue Aug 29 10:30:27 1995  Mike Stump  <mrs@cygnus.com>
2639
2640         * except.c (expand_internal_throw): Oops, almost forgot type and
2641         value are now trees.
2642
2643 Mon Aug 28 17:57:45 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
2644
2645         Fix the attribute handling to make sure they get noted before we
2646         create the function's RTL, in case they can affect that.
2647         * decl.c (grokfndecl): New arg ATTRLIST.  Run
2648         cplus_decl_attributes before creating the decl's rtl.
2649         (grokdeclarator): New arg ATTRLIST, passed down into grokfndecl.
2650         (shadow_tag, groktypename, start_decl, start_method): Pass a
2651         NULL_TREE to grokdeclarator's new last arg.
2652         * decl2.c (grokfield): New arg ATTRLIST, passed into grokdeclarator.
2653         (grokbitfield, grokoptypename): Pass a NULL_TREE to
2654         grokdeclarator's new last arg.
2655         * except.c (expand_start_catch_block): Likewise.
2656         * pt.c (process_template_parm, end_template_decl,
2657         do_function_instantiation): Likewise.
2658         * cp-tree.h (grokfield): Add arg.
2659         (grokdeclarator): Move the prototype from here...
2660         * decl.h: ...to here.
2661         * lex.c (cons_up_default_function): Pass NULL_TREE to grokfield
2662         ATTRLIST argument.
2663         * parse.y: Create a list for the grokfield arg where appropriate,
2664         and pass it down instead of calling cplus_decl_attributes.
2665
2666 Mon Aug 28 15:07:24 1995  Mike Stump  <mrs@cygnus.com>
2667
2668         * except.c: Always allow turning on exception handling.  Allow cross
2669         compilations to use EH.
2670
2671 Thu Aug 24 17:39:24 1995  Mike Stump  <mrs@cygnus.com>
2672
2673         * except.c (saved_pc, saved_throw_type, saved_throw_value): Use
2674         trees, instead of rtxs, and don't depend on using special machine
2675         dependent registers.
2676         (expand_internal_throw): Ditto.
2677         (init_exception_processing): Ditto.
2678         (expand_start_all_catch): Ditto.
2679         (expand_end_all_catch): Ditto.
2680         (expand_start_catch_block): Ditto.
2681         (expand_leftover_cleanups): Ditto.
2682         (expand_end_catch_block): Ditto.
2683         (expand_builtin_throw): Ditto.
2684         (expand_throw): Ditto.
2685
2686 Wed Aug 23 17:25:51 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2687
2688         * cvt.c (build_expr_type_conversion): Handle conversions to
2689         reference types.
2690
2691 Wed Aug 23 15:33:59 1995  Mike Stump  <mrs@cygnus.com>
2692
2693         * except.c (do_unwind): Work around backend bug with -fpic.
2694
2695 Tue Aug 22 17:20:07 1995  Per Bothner  <bothner@kalessin.cygnus.com>
2696
2697         * decl2.c (flag_new_for_scope):  Add a new mode that follows ANSI
2698         for-scoping, but supports (and warns about) old programs.
2699         Make the new mode (with value 1) the default.
2700         (lang_f_options):  The on-value for flag_new_for_scope is now 2.
2701         * cp-tree.h (DECL_DEAD_FOR_LOCAL, DECL_ERROR_REPORTED): New macros
2702         (DECL_SHADOWED_FOR_VAR):  Likewise.
2703         * decl.c (struct binding_level):  New fields dead_vars_from_for
2704         and is_for_scope.
2705         (note_level_for_for):  New function.
2706         (poplevel):  Special processing if is_for_scope.
2707         (pushdecl):  Warn if for-scope variable shadows local.
2708         * lex.c (do_identifier):  Handle old (non-ANSI) for scoping,
2709         and warn if conflicts.
2710         * parse.y (FOR):  Call note_level_for_for.
2711
2712 Mon Aug 21 10:28:31 1995  Jason Merrill  <jason@deneb.cygnus.com>
2713
2714         * decl2.c (import_export_inline): Class interface hackery does not
2715         apply to synthesized methods.
2716
2717 Sun Aug 20 16:29:00 1995  Mike Stump  <mrs@cygnus.com>
2718
2719         * search.c (virtual_context): Find the right context more often.
2720         Solves a `recoverable compiler error, fixups for virtual function'
2721         problem.
2722
2723 Sun Aug 20 13:53:24 1995  Mike Stump  <mrs@cygnus.com>
2724
2725         * except.c (expand_start_all_catch): Ensure that we always transfer
2726         control to the right EH handler, by rethrowing the end label on the
2727         region, instead of hoping we are nested and falling through.
2728         (expand_leftover_cleanups): Ditto.
2729         (end_protect): Since we now rethrow the end label, put a
2730         nop after it, so that outer regions are recognized.
2731         * init.c (build_vec_delete_1): New routine to handle most of vector
2732         deleting, all code moved here from build_vec_delete.
2733         (build_array_eh_cleanup): Use build_vec_delete_1 to do all the real
2734         work.
2735         (expand_vec_init): If the array needs partial destructing, setup an
2736         EH region to handle it.
2737         (build_vec_delete): Move lots of code to build_vec_delete_1, use
2738         build_vec_delete_1 to do the grunt work.
2739         
2740 Sat Aug 19 14:25:33 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
2741
2742         Handle decl attributes properly for function definitions without
2743         previous attribute-loaded declarations.
2744         * decl.c (start_function): New arg ATTRS.  Add a call to
2745         cplus_decl_attributes with it before we create the RTL.
2746         * cp-tree.h (start_function): Update prototype.
2747         * parse.y (fn.def1): Pass ATTRS into start_function instead of
2748         trying to call cplus_decl_attributes too late.  Pass a NULL_TREE
2749         for other use.
2750         * decl2.c (finish_file): Pass NULL_TREE as fourth arg to
2751         start_function.
2752         * method.c (synthesize_method): Likewise.
2753         * except.c (expand_builtin_throw): Likewise for start on __throw.
2754
2755 Sat Aug 19 13:36:08 1995  Mike Stump  <mrs@cygnus.com>
2756
2757         * class.c (set_rtti_entry): Turn on -fvtable-thunk -frtti support.
2758         This changes -fvtable-thunks vtable layout, so a recompile will be
2759         necessary, if you use -fvtable-thunks.
2760         (get_vtable_entry): Use n, instead of i to be consistent with the
2761         rest of the compiler.
2762         (get_vtable_entry_n): Ditto.
2763         (add_virtual_function): Add a slot for the tdesc, if -fvtable-thunks
2764         are being used.
2765         (finish_struct_1): Ditto.
2766         (skip_rtti_stuff): New routine to collapse similar code from many
2767         different parts of the compiler.  I think I got them all.
2768         (modify_one_vtable): Use it.
2769         (fixup_vtable_deltas1): Ditto.
2770         (override_one_vtable): Ditto.
2771         * decl2.c (mark_vtable_entries): Ditto.
2772         * tree.c (debug_binfo): Ditto.
2773         * search.c (expand_upcast_fixups): Ditto.
2774         (get_abstract_virtuals_1): Ditto.  Use virtuals, instead of tmp to
2775         consistent with the rest of the compiler.
2776         (get_abstract_virtuals): Ditto.
2777         * cp-tree.h (skip_rtti_stuff): New routine, declare it.
2778         * gc.c (build_headof): Support -fvtable-thunk and -frtti together.
2779         (build_typeid): Ditto.
2780         (build_classof): Remove old style way of doing rtti.  Remove support
2781         for `classof' and `headof'.
2782         * gxx.gperf: Ditto.
2783         * hash.h: Ditto.
2784         * parse.y: Ditto.
2785
2786 Fri Aug 18 17:31:58 1995  Jason Merrill  <jason@deneb.cygnus.com>
2787
2788         * decl.c (start_function): Clear ctor_label and dtor_label.
2789
2790         * class.c (finish_struct_1): Fix handling of access decls.
2791
2792 Tue Aug 15 19:21:54 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2793
2794         * class.c (finish_struct): Only do minimal processing here, so it
2795         can be used for class template definitions, as well.
2796         (finish_struct_1): New function with the rest of the code.
2797
2798 Tue Aug 15 09:46:16 1995  Mike Stump  <mrs@cygnus.com>
2799
2800         * class.c (prepare_fresh_vtable): On second though, always build the
2801         offset (see Aug 10 change), unless -fvtable-thunks is given.  It
2802         does this by calling the new routine set_rtti_entry.
2803         (finish_struct): Ditto.
2804         (set_rtti_entry): New routine to update the rtti information at the
2805         start of the vtable.
2806
2807 Mon Aug 14 12:21:22 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
2808
2809         * error.c (dump_decl, case IDENTIFIER_NODE): Only work on a dtor
2810         if it's declared in the C++ language spec.
2811         (dump_function_decl): Likewise.
2812         (dump_function_name): Likewise.
2813         (ident_fndecl): Make sure we got something back from lookup_name.
2814         * decl.c (start_function): Likewise.
2815
2816 Fri Aug 11 16:52:15 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2817
2818         * call.c (build_method_call): Don't call build_new when calling a
2819         constructor without an instance.
2820
2821 Thu Aug 10 20:00:17 1995  Mike Stump  <mrs@cygnus.com>
2822
2823         * class.c (prepare_fresh_vtable): Always build the offset to the
2824         complete object, as it doesn't cost much.  This allows dynamic_cast
2825         to void * to work when -frtti isn't given.
2826         (finish_struct): Ditto.
2827
2828 Thu Aug 10 16:31:28 1995  Mike Stump  <mrs@cygnus.com>
2829
2830         * except.c (build_eh_type): Split out some functionality to new
2831         routine named build_eh_type_type.
2832         (build_eh_type_type): New routine.
2833         (expand_start_catch_block): Use build_eh_type_type, as we never want
2834         the dynamic type of the catch parameter, just the static type.
2835         Fixes core dumps when -frtti is used and one catchs pointers to
2836         classes.
2837
2838 Thu Aug 10 14:55:29 1995  Mike Stump  <mrs@cygnus.com>
2839
2840         * except.c (expand_builtin_throw): Since we now use normal calling
2841         conventions for __throw, we have to remove the first layer off the
2842         stack, so that the next context we search for handlers is the outer
2843         context instead of the context that had the call to __throw, if we
2844         don't immediately find the desired context.
2845
2846 Tue Aug  8 17:44:23 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2847
2848         * tree.c (cp_expand_decl_cleanup): Returns int, not tree.
2849         * cp-tree.h: Update.
2850
2851         * parse.y (template_type_parm): Add support for `typename'.
2852
2853 Tue Aug  8 12:06:31 1995  Mike Stump  <mrs@cygnus.com>
2854
2855         * except.c (expand_internal_throw): New internal routine to throw a
2856         value.
2857         (expand_end_all_catch, expand_leftover_cleanups): All throwers
2858         changed to use `expand_internal_throw' instead of jumping to throw
2859         label.
2860         (expand_end_catch_block, expand_throw): Ditto.
2861         (throw_label): Removed.
2862         (expand_builtin_throw): Changed so that EH parameters are passed by
2863         normal function call conventions.  Completes Aug 4th work.
2864
2865 Fri Aug  4 17:17:08 1995  Mike Stump  <mrs@cygnus.com>
2866
2867         * cp-tree.h (expand_builtin_throw): Declare it.
2868         * decl2.c (finish_file): Call expand_builtin_throw.
2869         * except.c (make_first_label): Remove.
2870         (init_exception_processing): Don't use a LABEL_REF for throw_label,
2871         instead use a SYMBOL_REF, this is so that we don't use LABEL_REFs in
2872         other functions that don't really appear in those functions.  This
2873         solves a problem where cc1plus consumed exponential amounts of
2874         memory when -Wall was used.
2875         (expand_end_all_catch, expand_leftover_cleanups,
2876         expand_end_catch_block, expand_throw): Change all uses of
2877         throw_label to match new style.
2878         (do_unwind): Rename parameter to inner_throw_label, as it is now
2879         different from throw_label.  Also, assume that our caller will wrap
2880         the passed label with a LABEL_REF, if needed.
2881         (expand_builtin_throw): Make external, change so that the generated
2882         throw is now a real function.
2883         (expand_exception_blocks): Never generate throw code inside another
2884         function.
2885
2886 Fri Aug  4 12:20:02 1995  Mike Stump  <mrs@cygnus.com>
2887
2888         * decl.c (grokdeclarator): Move checking of mutable const objects
2889         and mutable static objects down, as we might decide during parsing
2890         to unset staticp or constp (for example, when const is part of the
2891         object being pointed to).
2892
2893 Thu Aug  3 17:13:43 1995  Mike Stump  <mrs@cygnus.com>
2894
2895         * except.c (output_exception_table_entry): Enhance portability to
2896         weird machines.
2897         (emit_exception_table): Ditto.
2898
2899 Thu Aug  3 16:41:38 1995  Mike Stump  <mrs@cygnus.com>
2900
2901         * typeck.c (build_ptrmemfunc): Handle casting of pointer to
2902         non-virtual member functions.
2903
2904 Wed Aug  2 11:58:25 1995  Mike Stump  <mrs@cygnus.com>
2905
2906         * gc.c (build_typeid): Strip cv qualifiers so that const T&, T&, T
2907         and const T all match.
2908
2909 Wed Aug  2 11:25:33 1995  Mike Stump  <mrs@cygnus.com>
2910
2911         * except.c (build_eh_type): Strip cv qualifiers so that const T&,
2912         T&, T and const T all match.
2913
2914 Tue Aug  1 14:20:16 1995  Mike Stump  <mrs@cygnus.com>
2915
2916         * except.c: Fix up comments, cleanup code and eliminate exceptNode,
2917         exceptStack, exceptstack, push_except_stmts, pop_except_stmts,
2918         new_except_stack, push_last_insn, pop_last_insn, insn_save_node and
2919         InsnSave.  Also, numerous speed improvements, and correctness
2920         improvements.  Double faulting in all situations should now be
2921         handled correctly.
2922         (expand_start_all_catch): Instead of having many terminate protected
2923         regions, just have one.
2924         (expand_start_catch_block): No longer have to protect
2925         false_label_rtx, as it isn't used for EH region marking.
2926         (expand_end_catch_block): Expand out EH cleanups here by using
2927         expand_leftover_cleanups.
2928         (expand_end_all_catch): Use sequences instead of playing with insn
2929         links directly.
2930         (expand_exception_blocks): Ditto.  Also protect all catch clauses
2931         with one terminate region.
2932
2933 Mon Jul 31 13:24:30 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2934
2935         * method.c (report_type_mismatch): Don't talk about an object
2936         parameter for non-methods.
2937
2938 Sun Jul 30 13:13:02 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2939
2940         * class.c (finish_struct): Catch private and protected members of
2941         anonymous unions here.
2942         * decl2.c (finish_anon_union): And here.
2943         * parse.y: Instead of here.
2944
2945         * errfn.c (ARGSLIST): Support passing four args.
2946         * error.c (cv_as_string): New function.
2947         (cp_printers): Add it.
2948         * call.c (build_method_call): Report 'const' at end of pseudo-decl.
2949
2950         * method.c (report_type_mismatch): Deal with a bad_arg of 0.
2951
2952         * init.c (expand_aggr_init): Handle volatile objects, too.
2953
2954 Sat Jul 29 13:42:03 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2955
2956         * decl.c (struct binding_level): Keep list of incomplete decls.
2957         (print_binding_level): Use list_length to count them.
2958         (pushdecl): Build up the list.
2959         (hack_incomplete_structures): Walk it and prune completed decls.
2960
2961 Fri Jul 28 15:26:44 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2962
2963         * typeck.c (comp_target_types): Don't check const and volatile for
2964         function types.
2965         (comp_ptr_ttypes_real): Ditto.
2966
2967 Thu Jul 27 15:40:48 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2968
2969         * typeck.c (comp_target_types): Fix.
2970
2971 Thu Jul 27 15:10:48 1995  Mike Stump  <mrs@cygnus.com>
2972
2973         * cp-tree.h (unsave_expr_now, build_unsave_expr,
2974         cp_expand_decl_cleanup): Declare new routines.
2975         * decl.c (cp_finish_decl, store_parm_decls,
2976         hack_incomplete_structures): Change all cals from
2977         expand_decl_cleanup to cp_expand_decl_cleanup.
2978         * gc.c (protect_value_from_gc): Ditto.
2979         * expr.c (cplus_expand_expr): Handle UNSAVE_EXPRs.
2980         * tree.c (unsave_expr): New routine to build an UNSAVE_EXPR.
2981         (unsave_expr_now): Backend routine used by tree expander.
2982         (cp_expand_decl_cleanup): Wrap second argument in an UNSAVE_EXPR to
2983         work around a limitation in the backend.  The backend uses the
2984         cleanups multiple times, on disjoint control flows, so we cannot
2985         pass unsaved SAVE_EXPRs to the backend.
2986         * tree.def (UNSAVE_EXPR): New tree code.
2987         * typeck.c (c_expand_return): Move goto/return code up inside
2988         conditional, as we don't always want to do this, we only want to do
2989         this when we don't otherwise finish with this control flow.
2990
2991 Thu Jul 27 10:38:43 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
2992
2993         * parse.y (typespec): Only complain about typeof if we're not
2994         getting it from a system header.
2995
2996 Thu Jul 27 10:26:23 1995  Doug Evans  <dje@canuck.cygnus.com>
2997
2998         Clean up prefix attribute handling.
2999         * parse.y (reserved_declspecs): Link prefix attributes with declspecs.
3000         (declmods): Likewise.
3001         (all rules that reference typed_declspecs and declmods): Call
3002         split_specs_attrs or strip_attrs to separate declspecs and attrs.
3003         (lang_extdef): Delete resetting of prefix_attributes.
3004         (template_def, notype_declarator rule): Use NULL_TREE for
3005         prefix_attributes.
3006         (condition): Use NULL_TREE for prefix_attributes.
3007         (setattrs): Deleted.
3008         (nomods_initdcl0): Set prefix_attributes to NULL_TREE.
3009         (component_decl): Delete resetting of prefix_attributes.
3010         (component_decl_1, notype_components rule): Use NULL_TREE for
3011         prefix_attributes.
3012         (simple_stmt): Delete resetting of prefix_attributes.
3013
3014 Mon Jul 24 13:37:53 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3015
3016         * call.c (convert_harshness): Deal with reference conversions before
3017         others.  Actually do array->pointer decay.  Call comp_target_types
3018         with pointer types rather than their targets.
3019
3020         * typeck.c (comp_target_types): Avoid assigning D const * to B *.
3021
3022 Mon Jul 24 08:54:46 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
3023
3024         * pt.c (to_be_restored): Move decl to global scope.
3025
3026 Sat Jul 22 12:22:11 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3027
3028         * decl.c (start_decl): Put back clearing of DECL_IN_AGGR_P.
3029
3030 Fri Jul 21 17:09:02 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3031
3032         * decl.c (grokdeclarator): Downgrade error about 'extern int A::i'
3033         to pedwarn.
3034
3035         * pt.c (instantiate_template): Also avoid instantiation if the
3036         function has already been declared to be a specialization.
3037
3038         * decl2.c (check_classfn): Ignore cname argument, and return the
3039         matching function.
3040
3041         * decl.c (start_decl): Handle declarations of member functions
3042         outside of the class (i.e. specialization declarations).
3043
3044 Thu Jul 20 10:34:48 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3045
3046         * class.c (finish_struct): Don't mess with the type of bitfields.
3047
3048         * various.c: s/TYPE_POINTER_TO/build_pointer_type/.
3049
3050 Thu Jul 20 01:43:10 1995  Mike Stump  <mrs@cygnus.com>
3051
3052         * init.c (expand_aggr_init): Assume LOOKUP_ONLYCONVERTING if init
3053         is not a parameter list (TREE_LIST).
3054         (expand_default_init): If LOOKUP_ONLYCONVERTING is set, then set
3055         LOOKUP_NO_CONVERSION so that we don't allow two-level conversions,
3056         but don't set it otherwise.
3057
3058 Wed Jul 19 20:32:01 1995  Mike Stump  <mrs@cygnus.com>
3059
3060         * init.c (expand_default_init): Don't allow two-level conversions
3061         during construction.
3062
3063 Wed Jul 19 18:06:37 1995  Mike Stump  <mrs@cygnus.com>
3064
3065         * gc.c (build_headof): The type of dyncasting to a pointer to cv
3066         void, should be pointer to cv void.
3067
3068 Wed Jul 19 17:25:43 1995  Mike Stump  <mrs@cygnus.com>
3069
3070         * gc.c (build_dynamic_cast): Allow casting in const.
3071
3072 Wed Jul 19 16:34:27 1995  Mike Stump  <mrs@cygnus.com>
3073
3074         * typeck.c (build_const_cast): If we are passed error_mark_node,
3075         return it.
3076
3077 Wed Jul 19 15:24:48 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
3078
3079         * class.c (push_nested_class): Make sure TYPE is non-nil.
3080
3081         * cvt.c (type_promotes_to): Watch for error_mark_node on the
3082         incoming TYPE.
3083
3084 Wed Jul 19 13:23:12 1995  Gerald Baumgartner  <gb@alexander.cs.purdue.edu>
3085
3086         * cp-tree.h (SIGTABLE_VT_OFF_NAME): Renamed from SIGTABLE_OFFSET_NAME.
3087         (SIGTABLE_VB_OFF_NAME): New macro.
3088         (vt_off_identifier): Renamed from offset_identifier.
3089         (vb_off_identifier): Added extern declaration.
3090
3091         * decl.c (vt_off_identifier): Renamed from offset identifier.
3092         (vb_off_identifier): New variable to hold the identifier for the
3093         sigtable field vb_off.
3094         (init_decl_processing): Initialize vb_off_identifier.
3095         Renamed vt_off_identifier from offset_identifier.
3096         * sig.c (build_signature_method_call): Renamed offset_identifier and
3097         local variable offset to vt_off_identifer and vt_off, respecitively.
3098         * sig.c (build_signature_table_constructor): Renamed offset to vt_off.
3099
3100         * decl.c (init_decl_processing): Add vb_off field to
3101         sigtable_entry_type.  Reorder fields so that pfn gets properly
3102         aligned at a 64 bit boundary on the Alpha.
3103         * sig.c (build_signature_table_constructor): Build the constructor
3104         according to the new layout.  Set the vb_off field to -1 for now.
3105
3106         * decl.c (init_decl_processing): Align sigtable_entry_type on word
3107         boundaries instead of double word boundaries to save space.
3108
3109 Tue Jul 18 16:58:37 1995  Mike Stump  <mrs@cygnus.com>
3110
3111         * cvt.c (cp_convert): Always call build_cplus_new for a ctor.
3112
3113 Tue Jul 18 14:24:53 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
3114
3115         * parse.y (opt.component_decl_list): Only forbid private/protected
3116         in anonymous unions.  We need to make this know when the type is
3117         defined for an object, to not give the error.
3118
3119 Mon Jul 17 14:22:44 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
3120
3121         * parse.y (opt.component_decl_list): Don't allow access control
3122         as private or protected for union members.
3123
3124 Sun Jul 16 14:01:00 1995  Jim Wilson  <wilson@chestnut.cygnus.com>
3125
3126         * lex.c (check_newline): For 'p' case, move goto skipline line to
3127         before end brace for 'pragma'.
3128
3129 Fri Jul  7 13:55:58 1995  Mike Stump  <mrs@cygnus.com>
3130
3131         * g++.1: Tiny updates.
3132
3133 Fri Jul  7 13:05:20 1995  Mike Stump  <mrs@cygnus.com>
3134
3135         * decl.c (cp_finish_decl): Only destruct local static variables if
3136         they are constructed, and only construct the first time control
3137         passes completely through its declaration (if not initialized with a
3138         constant-expression).
3139         (expand_static_init): Ditto.
3140
3141 Wed Jul  5 14:05:04 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
3142
3143         * typeck.c (comptypes, case OFFSET_REF): If either offset basetype
3144         is a TEMPLATE_TYPE_PARM, give a match.
3145
3146 Fri Jun 30 15:42:57 1995  Mike Stump  <mrs@cygnus.com>
3147
3148         * method.c (build_overload_value): Handle encoding of null pointer
3149         constants (or any pointer with a constant numeric value) for
3150         templates.
3151
3152 Fri Jun 30 13:45:51 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
3153
3154         * call.c (convert_harshness): Add QUAL_CODE when we're faced with
3155         const vs non-const for void conversions.
3156
3157 Fri Jun 30 10:19:52 1995  Mike Stump  <mrs@cygnus.com>
3158
3159         * except.c (expand_start_all_catch): Fix problem with finding an
3160         outer nested try block when there is no code to separate it from an
3161         inner try block.
3162
3163 Fri Jun 30 02:22:26 1995  Mike Stump  <mrs@cygnus.com>
3164
3165         * search.c (dfs_pushdecls): Consume 2 or 3 orders of magnitude less
3166         memory please when virtual bases are used.
3167
3168 Thu Jun 29 19:03:47 1995  Mike Stump  <mrs@cygnus.com>
3169
3170         * class.c (build_vbase_path): Avoid testing things that cannot be
3171         null to see if they are null.
3172         * cvt.c (convert_pointer_to_vbase): Remove code that doesn't work.
3173         * decl.c (finish_function): Pass a type into the new
3174         convert_pointer_to_vbase instead of a binfo.
3175         * search.c (convert_pointer_to_vbase): Rewritten to use get_vbase
3176         and convert_pointer_to_real.
3177         (expand_indirect_vtbls_init): Use convert_pointer_to_vbase instead
3178         of the more cryptic call to get_vbase.
3179
3180 Thu Jun 29 09:35:05 1995  Mike Stump  <mrs@cygnus.com>
3181
3182         * decl.c (BOOL_TYPE_SIZE): Fix broken SLOW_BYTE_ACCESS check.
3183
3184 Thu Jun 29 03:43:55 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3185
3186         * pt.c (instantiate_template): Don't strip 'this' twice.
3187
3188         * pt.c (coerce_template_parms): Allow null pointer constants.
3189
3190         * decl.c (revert_static_member_fn): But only if DECL_ARGUMENTS is
3191         set.
3192
3193 Wed Jun 28 18:39:03 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3194
3195         * decl.c (revert_static_member_fn): Also remove 'this' from
3196         DECL_ARGUMENTS.
3197         * decl2.c (check_classfn): Don't revert this function until we get a
3198         match.
3199
3200 Wed Jun 28 14:07:27 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
3201
3202         * parse.y (component_decl): Clear PREFIX_ATTRIBUTES here.
3203
3204 Wed Jun 28 11:05:13 1995  Mike Stump  <mrs@cygnus.com>
3205
3206         * decl2.c (finish_file): Handle global vector news.
3207         * init.c (build_new): Encode vector news so that later we will know
3208         how many elements there are.
3209
3210 Mon Jun 26 13:38:06 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3211
3212         * expr.c (cplus_expand_expr): Don't mess with temp slots.
3213
3214         * decl2.c (warn_if_unknown_interface): Don't crash if tinst_for_decl
3215         returns null.
3216
3217         * decl2.c (check_classfn): Use revert_static_member_fn.
3218         * decl.c (revert_static_member_fn): Diagnose static member functions
3219         declared const or volatile.
3220
3221         * decl2.c (grokfield): Check for missing default args here, too.
3222         (check_default_args): Function to do the checking.
3223         * decl.c (pushdecl): Use it.
3224
3225         * decl.c (pushdecl): Don't warn about shadowing a member of `this'
3226         if there is no `this'.
3227
3228 Sun Jun 25 11:34:25 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3229
3230         * call.c (build_method_call): Downgrade 'called before definition'
3231         to a warning, as it ought to go away after Monterey.
3232
3233 Sat Jun 24 14:18:42 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3234
3235         * pt.c (coerce_template_parms): Don't do extra checking on pointer
3236         to member arguments.
3237
3238         * class.c (finish_struct): const and reference members don't prevent
3239         a class from being an aggregate.
3240
3241         * class.c (finish_struct): Signatures are always aggregates.
3242
3243 Fri Jun 23 17:20:29 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3244
3245         * decl2.c (check_classfn): Improve error message.
3246
3247         * pt.c (tsubst): Handle PROMOTE_PROTOTYPES.
3248
3249 Thu Jun 22 01:50:42 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3250
3251         * typeck.c (comptypes): Don't ignore method quals.
3252
3253         * class.c (finish_struct): Non-abstract virtuals are always USED.
3254
3255         * decl.c (build_ptrmemfunc_type): The underlying union type isn't
3256         IS_AGGR_TYPE, either.
3257         * class.c (finish_struct): Use CLASSTYPE_NON_AGGREGATE instead.
3258         * cp-tree.h: Ditto.
3259
3260         * cp-tree.h (lang_type): Add aggregate.
3261         (CLASSTYPE_AGGREGATE): New macro.
3262         (TYPE_NON_AGGREGATE_CLASS): Ditto.
3263         * class.c (finish_struct): Determine whether a class is an
3264         aggregate.
3265         * decl.c (cp_finish_decl): Check TYPE_NON_AGGREGATE_CLASS instead of
3266         TYPE_NEEDS_CONSTRUCTING.
3267         * typeck2.c (digest_init): Check TYPE_NON_AGGREGATE_CLASS for
3268         subobjects, too.
3269
3270         * pt.c (tsubst, PARM_TYPE): Propagate DECL_ARTIFICIAL.
3271
3272         * decl.c (start_function): For pre-parsed functions, layout all of
3273         the parm decls again.
3274         (grokvardecl): TREE_PUBLIC depends on DECL_THIS_EXTERN, not
3275         DECL_EXTERNAL.
3276
3277         * pt.c (coerce_template_parms): Improve checking for invalid
3278         template parms.
3279
3280 Wed Jun 21 12:01:16 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
3281
3282         * decl.c (grokdeclarator): Forbid declaration of a static member
3283         with the same name as its enclosing class.
3284
3285 Mon Jun 19 10:28:14 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3286
3287         * decl.c (finish_function): Clear current_class_decl.
3288
3289         * typeck.c (build_conditional_expr): Use convert (boolean_type_node
3290         instead of truthvalue_conversion.
3291
3292         * class.c (finish_struct): A data member with the same name as the
3293         class doesn't suppress constructors.
3294
3295 Fri Jun 16 18:11:39 1995  Gerald Baumgartner  (gb@alexander.cs.purdue.edu)
3296
3297         * decl.c (start_function): If current_class_decl is a signature
3298         pointer, don't dereference it but set C_C_D to current_class_decl.
3299
3300 Fri Jun 16 17:06:28 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3301
3302         * decl.c (duplicate_decls): Complain about virtual functions
3303         redeclared to be inline.
3304
3305 Fri Jun 16 13:20:38 1995  Mike Stump  <mrs@cygnus.com>
3306
3307         * decl.c (get_unique_name): New routine to name unnamed namespaces.
3308         (push_namespace): Use get_unique_name for naming unnamed namespaces.
3309
3310 Thu Jun 15 15:00:41 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3311
3312         * parse.y: Call cplus_decl_attributes with prefix_attributes where
3313         appropriate.
3314
3315 Wed Jun 14 19:24:49 1995  Mike Stump  <mrs@cygnus.com>
3316
3317         * search.c (get_vbase): New routine to switch hierarchies from the
3318         CLASSTYPE_VBASECLASSES to the normal one.
3319         (expand_indirect_vtbls_init): Use get_vbase to figure out how we
3320         want to convert to a vbase pointer.
3321
3322 Mon Jun 12 17:50:30 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3323
3324         * pt.c (instantiate_class_template): Add the new instantiation to
3325         template_classes.
3326         (do_pending_expansions): Call instantiate_member_templates on all of
3327         the classes in template_classes.
3328
3329 Mon Jun 12 12:36:59 1995  Mike Stump  <mrs@cygnus.com>
3330
3331         * decl.c (complete_array_type): Fill in the TYPE_DOMAIN of our
3332         TYPE_MAIN_VARIANT if it is not filled in.
3333         * init.c (build_delete): If the TYPE_DOMAIN is not set, give an
3334         error instead of core dumping.
3335
3336 Mon Jun 12 10:41:40 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3337
3338         * call.c (can_convert): Also check for distance > 0.
3339         (can_convert_arg): Ditto.
3340         (user_harshness): Ditto.
3341
3342 Fri Jun  9 19:17:21 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3343
3344         * g++.c (MATH_LIBRARY): Provide default.
3345         (main): Always link with the math library if we link with libstdc++.
3346
3347         * decl.c (start_function): Complain about redefinition of a function
3348         even when the pending_inline version is compiled after the other
3349         version.
3350
3351 Thu Jun  8 15:44:38 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3352
3353         * gc.c (build_dynamic_cast): Build up a reference to a parameter of
3354         aggregate type.
3355
3356 Wed Jun  7 15:31:57 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
3357
3358         * init.c (build_vec_delete): Resolve an offset ref before we try to
3359         use it.
3360
3361 Wed Jun  7 14:19:32 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3362
3363         * typeck.c (build_modify_expr): If the class lacks a constructor or
3364         assignment operator, return error_mark_node.
3365         (common_type): Use build_cplus_array_type.
3366
3367 Tue Jun  6 09:41:27 1995  Mike Stump  <mrs@cygnus.com>
3368
3369         * class.c (dont_allow_type_definitions): New variable set when types
3370         cannot be defined.
3371         (finish_struct): Use it.
3372         * cp-tree.h (dont_allow_type_definitions): Define it.
3373         * parse.y (primary, handler_seq): Set it.
3374
3375 Mon Jun  5 18:49:38 1995  Mike Stump  <mrs@cygnus.com>
3376
3377         * method.c (build_opfncall): Use DECL_CHAIN, not TREE_CHAIN for
3378         results from lookup_fnfields.  Always give warning/error on bad
3379         code.
3380
3381 Mon Jun  5 11:39:37 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
3382
3383         * init.c (member_init_ok_or_else): Don't allow initialization of
3384         an ancestor's member from within a constructor.
3385
3386 Mon Jun  5 11:20:34 1995  Gerald Baumgartner  (gb@alexander.cs.purdue.edu)
3387
3388         * sig.c (build_signature_table_constructor): Use DECL_CONTEXT
3389         instead of DECL_CLASS_CONTEXT for calculating the vfield offset so
3390         abstract virtual functions are handled correctly.
3391
3392         * sig.c (build_signature_table_constructor): Store the correct
3393         delta in signature table entries.  It does not yet work for
3394         classes with virtual base classes as implementations of signatures.
3395         (build_signature_method_call): Add the delta to the object_ptr
3396         before generating the function call.
3397
3398         * call.c (build_method_call): Make instance_ptr the signature
3399         pointer itself instead of dereferencing the optr.
3400         * sig.c (build_signature_method_call): Dereference the optr for the
3401         direct and virtual calls.
3402
3403         * sig.c (build_signature_table_constructor): Make the tag for
3404         default implementations -1 instead of 2.
3405         (build_signature_method_call): Change the generated conditional
3406         expression correspondingly.
3407
3408         * sig.c (build_signature_pointer_constructor): Deleted the sorry
3409         message that said we can't handle multiple inheritance for
3410         implementations of signatures
3411         (build_signature_method_call): Use the offset from the sigtable
3412         entry instead of the vptr field from the signature pointer for
3413         building a virtual function call.
3414
3415         * class.c (build_vfn_ref): Deleted signature specific code, we don't
3416         call this function anymore from build_signature_method_call.
3417
3418         * cp-tree.h (SIGNATURE_VPTR_NAME): Deleted.  We use the right vptr
3419         field in the object now instead of in the signature pointer/ref. 
3420         (build_vptr_ref): Deleted extern declaration.
3421         * sig.c (build_vptr_ref): Deleted.
3422         (build_signature_pointer_or_reference_type): Deleted construction of
3423         the vptr field.
3424         (build_signature_pointer_constructor): Deleted initialization of/
3425         assignment to the vptr field.
3426
3427         * sig.c (build_signature_table_constructor): Convert the signature
3428         table entry fields to their correct types.
3429
3430         * sig.c (build_signature_table_constructor): Don't call digest_init
3431         for the fields of a sigtable entry, it's wasted time.
3432
3433         * sig.c (build_signature_table_constructor): Correctly set the
3434         offset and index fields of a sigtable entry.  Build the constructor
3435         the way digest_init does, digest_init can't handle initializing an
3436         anonymous union inside a struct.
3437         (build_signature_method_call): Use the index field instead of the
3438         delta field to get the vtable index.
3439
3440         * decl.c (init_decl_processing): Fix number of fields for building
3441         sigtable_entry_type.
3442
3443         * cp-tree.h (tag_identifier, offset_identifier): Added extern decls.
3444         (SIGTABLE_CODE_NAME): Renamed to SIGTABLE_TAG_NAME.
3445         (SIGTABLE_PFN_NAME): Deleted, we'll use VTABLE_PFN_NAME instead.
3446         * decl.c (tag_identifier, offset_identifier): New variables to
3447         hold the identifiers for the sigtable fields tag and offset.
3448         (init_decl_processing): Initialize these variables.
3449         (init_decl_processing): Use these variables to build the
3450         sigtable_entry_type structure.  Rename the code and offset fields
3451         to tag and delta, respectively; add offset and index fields. Changed
3452         types of fields from short_integer_type_node to delta_type_node.
3453         * sig.c (build_signature_table_constructor): Rename code and offset
3454         to tag and delta, respectively.
3455         (build_signature_method_call): Ditto.  Use above variables.
3456
3457 Thu Jun  1 17:03:51 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3458
3459         * decl.c (lookup_name_real): Don't try to look anything up in an
3460         erroneous object.
3461
3462 Fri Jun  2 10:30:14 1995  Mike Stump  <mrs@cygnus.com>
3463
3464         * method.c (build_overload_int): New routine.  Break out
3465         functionality from build_overload_value so we can reuse it.
3466         (build_overload_value): Handle pointer to member functions as value
3467         parameters for templates.
3468         (build_overload_identifier): Since template parameters are shared
3469         among all instantiations, we have to substitute in the real types
3470         in TREE_TYPE (parm).
3471         pt.c (coerce_template_parms): Ditto.
3472         (push_template_decls): Ditto.
3473         (grok_template_type): Deleted as template parameters are shared
3474         among all instantiations.
3475
3476 Wed May 31 19:10:32 1995  Mike Stump  <mrs@cygnus.com>
3477
3478         * decl.c (grokdeclarator): Always give errors on constant overflow
3479         for array indices.
3480
3481 Wed May 31 11:39:43 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3482
3483         * typeck.c (commonparms): Don't abort if simple_cst_equal returns < 0.
3484         (build_c_cast): Don't tack on a NON_LVALUE_EXPR when casting to
3485         reference type.
3486         (build_indirect_ref): Fix check for *&.
3487
3488 Fri Jun 16 06:54:03 1995  Mike Stump  <mrs@cygnus.com>
3489
3490         * Version 2.7.0 released.
3491
3492 Fri Jun 16 15:07:29 1995  Richard Kenner  (kenner@vlsi1.ultra.nyu.edu)
3493
3494         * Make-lang.in (DEMANGLER_PROG): Add LIBS.
3495
3496 Thu Jun 15 15:00:41 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3497
3498         * decl.c (define_function): Don't set DECL_INTERFACE_KNOWN.
3499
3500 Wed Jun  7 20:00:31 1995  Mike Stump  <mrs@cygnus.com>
3501
3502         * *.[chy]: Change all callers of finish_decl to cp_finish_decl.
3503         * decl.c (finish_decl): New routine to handle call backs from the
3504         mid end (declare_hidden_char_array).
3505
3506 Wed Jun  7 19:02:50 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3507
3508         * decl.c (start_function): Handle setting C_C_D here.
3509         (set_C_C_D): Removed.
3510         (struct saved_scope): Remove class_decl.
3511         (push_to_top_level): Don't save current_class_decl.
3512         (pop_from_top_level): Don't restore current_class_decl or C_C_D.
3513         (struct cp_function): Add C_C_D.
3514         (push_cp_function_context): Save C_C_D.
3515         (pop_cp_function_context): Restore C_C_D.
3516
3517 Fri Jun  2 11:05:58 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3518
3519         * decl.c (set_C_C_D): New function.  suspend_momentary before
3520         building C_C_D.
3521         (pop_from_top_level): Call it.
3522         (start_function): Ditto.
3523         (pop_cp_function_context): Ditto.
3524
3525         * class.c, cp-tree.h, decl.c, decl2.c, parse.y: Lose all references
3526         to current_vtable_decl, CLASSTYPE_INST_VAR and CLASSTYPE_VTBL_PTR.
3527
3528         * decl.c (push_cp_function_context): Save current_class_decl.
3529         (pop_cp_function_context): Restore current_class_decl and set C_C_D.
3530         (pop_from_top_level): Don't use CLASSTYPE_INST_VAR to set C_C_D.
3531         (start_function): Ditto.
3532
3533         * class.c (popclass): Don't mess with current_class_decl,
3534         current_vtable_decl, or C_C_D.
3535
3536 Mon May 29 12:45:10 1995  Paul Eggert  <eggert@twinsun.com>
3537
3538         * Make-lang.in (c++.mostlyclean): Remove $(DEMANGLER_PROG).
3539
3540 Wed May 24 15:55:18 1995  Richard Kenner  (kenner@vlsi1.ultra.nyu.edu)
3541
3542         * decl.c (duplicate_decls): Check simple_cst_equal result against 0.
3543         * decl2.c (finish_anon_union): Likewise.
3544         * method.c (largest_union_member): Likewise.
3545
3546 Wed May 24 14:41:11 1995  H.J. Lu  (hjl@nynexst.com)
3547
3548         * Make-lang.in (cxxmain.o): Replace single quotes with backslashes.
3549
3550 Mon May 22 17:38:48 1995  Richard Kenner  (kenner@vlsi1.ultra.nyu.edu)
3551
3552         * Make-lang.in (g++, g++-cross, cc1plus, DEMANGLER_PROG):
3553         Use $@ instead of output name so works even if have .exe.
3554         (cxxmain.o): Use cp if ln -s fails.
3555         (c++.install-man): Use $(exeext) in executable names.
3556         (c++.mostlyclean, stage[1-4]): Use $(objext) in object file names.
3557         * Makefile.in (../cc1plus): Use $(exeext) in name of executable.
3558
3559 Wed May 24 01:39:03 1995  Jason Merrill  <jason@deneb.cygnus.com>
3560
3561         * call.c (build_method_call): parms can be null, duh.
3562
3563 Tue May 23 01:32:09 1995  Jason Merrill  <jason@deneb.cygnus.com>
3564
3565         * call.c (build_method_call): If convert_arguments failed, just bail.
3566
3567 Fri May 19 10:31:11 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3568
3569         * cvt.c (convert_force): Pass LOOKUP_NORMAL to cp_convert.
3570
3571         * tree.c (copy_to_permanent): Oops.
3572
3573 Fri May 19 10:01:07 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
3574
3575         * cp-tree.h (break_out_target_exprs): Add decl.
3576
3577 Thu May 18 13:02:30 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3578
3579         * decl.c (start_function): Move *all* interface handling stuff after
3580         the pushdecl.
3581
3582         * tree.c (mapcar): Renamed from make_deep_copy and generalized.
3583         (perm_manip): Return t if permanent, otherwise 0.
3584         (copy_to_permanent): Use them.
3585         (bot_manip): Helper for break_out_target_exprs.
3586         (break_out_target_exprs): New function.  Uses mapcar.
3587
3588         * typeck.c (convert_arguments): Use it.
3589
3590         * method.c (hack_identifier): Use convert_from_reference to
3591         dereference a reference.
3592
3593 Wed May 17 17:54:54 1995  Mike Stump  <mrs@cygnus.com>
3594
3595         * call.c (convert_harshness): Move reference bashing before pointer
3596         to member bashing.
3597
3598 Wed May 17 16:57:53 1995  Mike Stump  <mrs@cygnus.com>
3599
3600         * cvt.c (convert_to_reference): Only complain, if complaints are
3601         wanted.
3602         * typeck.c (build_function_call_real): Ditto.  If LOOKUP_SPECULATIVELY
3603         is set and something won't work, return NULL_TREE.
3604         * cvt.c (cp_convert): Ditto.  Pass flags down to build_method_call.
3605         (convert): Pass LOOKUP_NORMAL to cp_convert.
3606         * typeck.c (convert_for_assignment): Ditto.
3607         (convert_force): Pass LOOKUP_COMPLAIN to cp_convert.
3608         (convert_arguments): Get out early if we get an error_mark_node.
3609         (convert_for_initialization): Use cp_convert instead of convert so
3610         that we can pass flags down.
3611         * cp-tree.h (LOOKUP_SPECULATIVELY): Added documentation.
3612
3613 Wed May 17 01:43:58 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3614
3615         * typeck2.c (store_init_value): Don't take the MAIN_VARIANT of the
3616         decl type.
3617
3618         * class.c (finish_struct): Don't complain about a class with no
3619         user-defined constructors but with a member that has no default
3620         constructor, as this is OK for aggregates.
3621
3622         * expr.c (cplus_expand_expr, NEW_EXPR): If this is an explicit
3623         constructor call, mark slot addressable.
3624
3625 Tue May 16 18:37:51 1995  Douglas Rupp  (drupp@cs.washington.edu)
3626
3627         * g++.c: Changed WINNT to _WIN32.
3628
3629 Tue May 16 12:40:16 1995  Jason Merrill  <jason@lisa.cygnus.com>
3630
3631         * lex.c (handle_sysv_pragma): Don't use token_buffer.
3632
3633 Tue May 16 12:05:26 1995  Mike Stump  <mrs@cygnus.com>
3634
3635         * call.c (resolve_scope_to_name): Add initial semantic support for
3636         namespaces.
3637         * class.c (finish_struct): Ditto.
3638         * cp-tree.h (NAMESPACE_LEVEL): Ditto.
3639         * cvt.c (build_up_reference, convert_to_reference): Ditto. 
3640         * decl.c (binding_level::namespace_p, suspend_binding_level): Ditto.
3641         (resume_binding_level, toplevel_bindings_p): Ditto
3642         (namespace_bindings_p, declare_namespace_level): Ditto.
3643         (resume_level, push_namespace, pop_namespace): Ditto.
3644         (pop_everything, pushtag, duplicate_decls, pushdecl): Ditto.
3645         (implicitly_declare, lookup_namespace_name, lookup_name_real): Ditto.
3646         (start_decl, make_temporary_for_reference), Ditto.
3647         (obscure_complex_init, finish_decl, expand_static_init): Ditto.
3648         (grokvardecl, grokdeclarator, parmlist_is_exprlist): Ditto.
3649         (store_parm_decls, hack_incomplete_structures): Ditto.
3650         * decl2.c (get_temp_name, finish_anon_union, current_namespace): Ditto.
3651         (push_namespace, pop_namespace, do_namespace_alias): Ditto.
3652         (do_toplevel_using_decl, do_class_using_decl): Ditto.
3653         * error.c (dump_decl): Ditto.
3654         * init.c (build_member_call, build_offset_ref): Ditto.
3655         * lex.c (identifier_type): Ditto.
3656         * parse.y (lang_extdef, using_decl, extdef, component_decl_1): Ditto.
3657         (nested_name_specifier_1): Ditto.
3658         * spew.c (yylex): Ditto.
3659         * tree.def (NAMESPACE_DECL): Ditto.
3660
3661 Tue May 16 11:55:35 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3662
3663         * decl.c (push_overloaded_decl): Return the new decl even if it
3664         can't be pushed.
3665
3666 Tue May 16 11:00:37 1995  Jason Merrill  <jason@lisa.cygnus.com>
3667
3668         * typeck.c (decay_conversion): Split out from default_conversion.
3669         (default_conversion): Call it.
3670         (build_binary_op): Ditto.
3671         (build_binary_op_nodefault): Use decay_conversion for truth ops.
3672
3673 Mon May 15 12:47:56 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3674
3675         * decl.c (warn_extern_redeclared_static): This is a pedwarn.
3676         (duplicate_decls): Always use the old decl's linkage info.  Don't
3677         play with linkage of consts.
3678         (pushdecl): Don't play with linkage of consts.
3679         (redeclaration_error_message): Don't complain about an old public
3680         decl and a new non-public decl here.
3681         (grokvardecl): Handle linkage of consts here.
3682         (grokdeclarator): An 'extern inline' is public.  Pass constp to
3683         grokvardecl.
3684         (start_function): Wait until after the pushdecl to do some linkage
3685         stuff.
3686
3687         * decl2.c (import_export_vtable): Make duplicates weak rather than
3688         static if supported.
3689         (import_export_inline): Ditto.
3690         * pt.c (do_pending_expansions): Ditto.
3691
3692         * class.c (build_vbase_path): flag_assume_nonnull_objects only
3693         affects reference conversion.
3694
3695         * init.c (emit_base_init): Build up an RTL_EXPR and add it to
3696         rtl_expr_chain.
3697         * decl.c, decl2.c: s/base_init_insns/base_init_expr/.
3698
3699 Tue May 16 07:06:28 1995  Paul Eggert  <eggert@twinsun.com>
3700
3701         * method.c (numeric_output_need_bar): Renamed from misspelling.
3702
3703         * typeck.c (build_ptrmemfunc): Fix misspellings in messages.
3704
3705 Sun May 14 10:26:22 1995  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3706
3707         * lang-options.h, lang-specs.h: New files.
3708
3709 Thu May 11 00:31:48 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3710
3711         * typeck.c (default_conversion): Don't check for BLKmode before
3712         pulling out the decl_constant_value.
3713
3714         * decl.c (start_function): Clear named_labels and shadowed_labels.
3715
3716         * typeck.c (build_function_call_real): Also synthesize methods here.
3717
3718 Wed May 10 00:55:59 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3719
3720         * decl2.c (finish_file): Synthesize exported methods before the
3721         reconsider loop.
3722
3723         * parse.y: Move declaration of flag_new_for_scope to file scope.
3724
3725 Tue May  9 19:10:33 1995  Mike Stump  <mrs@cygnus.com>
3726
3727         * decl2.c: Add flag_new_for_scope for new -ffor-scope flag.
3728         * parse.y (FOR): Conditionalize the pushing and poping of scope for
3729         the for-init-statement upon the new flag_new_for_scope.
3730         * parse.y (try_block): Simplify and use compstmt.
3731
3732 Mon May  8 12:41:52 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3733
3734         * decl.c (define_function): Mark function decl artificial.
3735
3736 Sun May  7 00:51:28 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3737
3738         * parse.y (simple_stmt, FOR): Put back push/pop for condition scope.
3739
3740         * decl2.c (grokclassfn): DECLs don't have cv-qualified types.
3741         * tree.c (build_cplus_method_type): Ditto.
3742
3743         * cp-tree.h (SET_DECL_ARTIFICIAL): Just set DECL_ARTIFICIAL to 1.
3744
3745         * typeck.c (build_function_call_real): If convert_arguments failed,
3746         just bail.
3747         (convert_arguments): If one of the arguments is error_mark_node,
3748         just bail.
3749
3750 Sat May  6 02:39:41 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3751
3752         * decl.c (duplicate_decls): Don't check DECL_NOT_REALLY_EXTERN for
3753         decls that don't include it.
3754
3755 Fri May  5 14:23:30 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3756
3757         * decl.c (duplicate_decls): Decls that have DECL_INTERFACE_KNOWN or
3758         DECL_NOT_REALLY_EXTERN set aren't extern decls.
3759
3760         * typeck.c (build_indirect_ref): Don't call default_conversion for a
3761         parameter of reference_type.
3762         * cvt.c (convert_from_reference): Just use build_indirect_ref.
3763
3764         * pt.c (do_type_instantiation): Only instantiate member functions
3765         that actually come from templates.
3766
3767 Fri May  5 09:46:05 1995  Mike Stump  <mrs@cygnus.com>
3768
3769         * parse.y: Generalized cleanup of poplevels, and compound statements
3770         and compound statements in try blocks.  Rewritten `for' rule so that
3771         the scope of variables declared in the for clause is shortened to
3772         span just to the end of the statement, instead of the whole
3773         containing block.
3774
3775 Fri May  5 00:37:14 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3776
3777         * call.c (convert_harshness): Handle pointers to members better.
3778
3779 Thu May  4 16:00:26 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3780
3781         * decl2.c (delete_sanity): Do access control here.
3782         * init.c (build_delete): Instead of here.
3783
3784         * Make-lang.in: Build c++filt.
3785
3786 Wed May  3 02:59:53 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3787
3788         * decl2.c (cplus_decl_attributes): If we just modified a TYPE_DECL,
3789         update our IDENTIFIER_TYPE_VALUE.
3790
3791 Fri Apr 28 07:58:41 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3792
3793         * lex.c (cons_up_default_function): Fix linkage of #pragma
3794         implemented functions.
3795
3796 Thu Apr 27 16:56:24 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3797
3798         * method.c (build_overload_name): Simplify and fix repeated type
3799         folding.
3800
3801         * decl.c (grokdeclarator): Prohibit pointers to void or reference
3802         members.
3803
3804 Thu Apr 27 09:49:07 1995  Mike Stump  <mrs@cygnus.com>
3805
3806         * typeck2.c (process_init_constructor): Make sure initializers are
3807         fully digested.
3808
3809 Thu Apr 27 01:11:55 1995  Jason Merrill  <jason@python.cygnus.com>
3810
3811         * lex.c (cons_up_default_function): Always defer synthesis.
3812
3813 Thu Apr 27 00:20:37 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3814
3815         * decl2.c (mark_inline_for_output): Don't play with pending_inline
3816         stuff.
3817
3818 Wed Apr 26 17:48:24 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3819
3820         * call.c (user_harshness): New function; like build_type_conversion,
3821         but doesn't actually build anything.
3822         (compute_conversion_costs): Use it instead of build_type_conversion.
3823
3824 Wed Apr 26 17:11:25 1995  Jason Merrill  <jason@deneb.cygnus.com>
3825
3826         * typeck.c (build_function_call_real): Improve error message for
3827         calling a non-function.
3828
3829         * method.c (hack_identifier): Lose check for calling a data member.
3830
3831 Wed Apr 26 16:59:13 1995  Mike Stump  <mrs@cygnus.com>
3832
3833         * typeck2.c (build_functional_cast): Remove very old cruft.
3834         Seems like good code is generated without it.
3835
3836 Wed Apr 26 00:47:16 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3837
3838         * method.c (do_build_assign_ref): Fix handling of anonymous unions.
3839         (do_build_copy_constructor): Ditto.
3840
3841         * parse.y (simple_stmt, SWITCH): Call {push,pop}_switch.
3842
3843         * decl.c (push_switch): New function.
3844         (pop_switch): Ditto.
3845         (define_case_label): Check for jumping over initialization.
3846
3847         * call.c (build_method_call): Check for an inline function being
3848         called before its definition has been seen.
3849         * typeck.c (build_function_call_real): Ditto.
3850
3851         * decl.c (duplicate_decls): Check for a function being redeclared
3852         inline after its address has been taken.
3853
3854         * typeck.c (build_conditional_expr): Handle related class lvalues.
3855
3856 Tue Apr 25 13:20:45 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3857
3858         * pt.c (do_pending_expansions): Don't expand unused templates.
3859
3860         * parse.y (component_decl): Accept a lone semicolon.
3861
3862 Tue Apr 25 00:25:56 1995  Jason Merrill  <jason@rtl.cygnus.com>
3863
3864         * call.c (build_method_call): Don't allow an RTL_EXPR to serve as the
3865         object parameter anymore.
3866
3867         * expr.c (cplus_expand_expr): Don't create RTL_EXPRs with no insns.
3868
3869 Mon Apr 24 12:35:48 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3870
3871         * parse.y (simple_stmt, decl case): Clear prefix_attributes.
3872         (lang_extdef): Ditto.
3873
3874         * parse.y (maybe_parmlist): New rule for use in declarators where
3875         this could either be a list of expressions or parameters.  Calls
3876         suspend_momentary before deciding which.
3877         (direct_after_type_declarator): Use it.
3878         (complex_direct_notype_declarator): Use it.
3879
3880         * pt.c (tsubst): Propagate attributes const and noreturn.
3881
3882         * typeck.c (build_modify_expr): If warn_synth, call build_opfncall
3883         before doing the default thing.
3884
3885 Thu Apr 27 21:49:36 1995  Doug Evans  <dje@cygnus.com>
3886
3887         * typeck.c (common_type): Call lookup_attribute instead of
3888         value_member.
3889
3890 Tue Apr 25 18:07:43 1995  Richard Kenner  (kenner@vlsi1.ultra.nyu.edu)
3891
3892         * Make-lang.in: Change "realclean" to "maintainer-clean".
3893
3894 Sun Apr 23 12:32:38 1995  Mike Stump  <mrs@cygnus.com>
3895
3896         * decl2.c (finish_file): Fix broken linked list handling.
3897
3898 Fri Apr 21 18:08:43 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3899
3900         * class.c (finish_base_struct): Don't set TYPE_HAS_COMPLEX_*_REF
3901         as often.
3902         (finish_struct): Ditto.
3903
3904         * various: Use TYPE_HAS_TRIVIAL_* instead of TYPE_HAS_COMPLEX_*.
3905
3906         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): New macro.
3907         (TYPE_HAS_TRIVIAL_ASSIGN_REF): New macro.
3908
3909 Fri Apr 21 15:52:22 1995  Jason Merrill  <jason@python.cygnus.com>
3910
3911         * typeck.c (c_expand_return): Only expand a returned TARGET_EXPR if
3912         it is of the same type as the return value.
3913
3914 Fri Apr 21 03:01:46 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3915
3916         * decl2.c (finish_file): Reconsider if synthesizing a method wrote
3917         out its assembly.
3918
3919         * typeck.c (convert_for_initialization): Don't call a trivial copy
3920         constructor.
3921
3922         * typeck2.c (store_init_value): Only abort if the type has a
3923         non-trivial copy constructor.
3924
3925         * typeck.c (c_expand_return): If we're returning in a register and
3926         the return value is a TARGET_EXPR, expand it.  Only do
3927         expand_aggr_init if we're returning in memory.
3928         (expand_target_expr): Function to expand a TARGET_EXPR.
3929         (build_modify_expr): Use it.
3930
3931         * tree.c (build_cplus_new): Layout the slot.
3932
3933         * expr.c (cplus_expand_expr): Use expand_call to expand the call
3934         under a NEW_EXPR, so the target is not discarded.
3935
3936 Thu Apr 20 14:59:31 1995  Mike Stump  <mrs@cygnus.com>
3937
3938         * gc.c (build_dynamic_cast): Tighten error checking.
3939
3940 Thu Apr 20 11:23:54 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3941
3942         * expr.c (cplus_expand_expr): Only abort if the returned target is
3943         different from what we expected if the type has a non-trivial copy
3944         constructor.
3945
3946         * decl2.c (cplus_decl_attributes): Attributes applied to a template
3947         really apply to the template's result.
3948
3949         * tree.c (lvalue_p): Check IS_AGGR_TYPE instead of TREE_ADDRESSABLE
3950         to decide whether to consider a CALL_EXPR an lvalue.
3951
3952         * class.c (finish_struct_bits): Only set TREE_ADDRESSABLE if the
3953         type has a non-trivial copy constructor.
3954
3955         * decl.c (start_function): If interface_known, unset
3956         DECL_NOT_REALLY_EXTERN on the function.
3957
3958 Wed Apr 19 16:53:13 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3959
3960         * pt.c (do_function_instantiation): Handle explicit instantiation of
3961         member functions.
3962         (do_type_instantiation): Handle 'inline template class foo<int>',
3963         meaning just spit out the vtable.
3964
3965         * lex.c (cons_up_default_function): Set DECL_NOT_REALLY_EXTERN on
3966         the consed functions.
3967
3968         * decl2.c (import_export_inline): Set DECL_INTERFACE_KNOWN.
3969
3970 Wed Apr 19 16:28:17 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
3971
3972         * call.c, class.c, decl2.c, gc.c, init.c, parse.y, pt.c, search.c,
3973         typeck.c: Include output.h.
3974
3975 Wed Apr 19 14:57:21 1995  Gerald Baumgartner  (gb@alexander.cs.purdue.edu)
3976
3977         * call.c (build_method_call): Allow a signature member functions to
3978         be called from a default implementation.
3979
3980 Wed Apr 19 10:21:17 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3981
3982         * repo.c (finish_repo): Remember what directory we are in.
3983
3984         * search.c (expand_upcast_fixups): Don't mess with abort_fndecl.
3985
3986         * repo.c: Use obstacks instead of fixed-size buffers.  Don't spit
3987         out the second copy of the symbol name.  Don't remember COLLECT_GCC.
3988
3989 Wed Apr 19 02:32:40 1995  Mike Stump  <mrs@cygnus.com>
3990
3991         * search.c (virtual_context): New function to get the virtual
3992         context of a function.
3993         (expand_upcast_fixups): New function to generate runtime vtables.
3994         (fixup_virtual_upcast_offsets): Ditto.
3995         (expand_indirect_vtbls_init): Use fixup_virtual_upcast_offsets to
3996         ensure that the this offsets for upcasts from virtual bases into
3997         other virtual bases or non-virtual bases are correct at construction
3998         time and destruction time.
3999         * class.c (fixup_vtable_deltas): Modify to fixup all offsets in all
4000         vtables in all virtual bases, instead of just one vtable in each
4001         virtual base.
4002         (fixup_vtable_deltas1): Ditto.
4003
4004 Tue Apr 18 03:57:35 1995  Michael Meissner  (meissner@cygnus.com)
4005
4006         * Makefile.in (lex.o): Add dependency on c-pragma.h.
4007
4008         * lex.c (handle_sysv_pragma): Use NULL_PTR and NULL_TREE as
4009         appropriate, instead of 0.
4010
4011 Mon Apr 17 12:28:42 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4012
4013         * decl.c (pushdecl): Use decls_match, not duplicate_decls, for
4014         comparing local and global decls.
4015
4016 Fri Apr 14 01:46:52 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4017
4018         * typeck.c (convert_arguments): Only prohibit passing to ... of
4019         types with non-trivial copy constructors.
4020
4021         * repo.c (repo_template_used): Don't try to mess with no id.
4022
4023 Fri Apr 14 23:32:50 1995  Per Bothner  <bothner@rtl.cygnus.com>
4024
4025         * decl.c (duplicate_decls):  Use cp_warning_at for redundant-decls.
4026
4027 Thu Apr 13 15:37:42 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
4028
4029         * cp-tree.h (current_tinst_level): Delete declaration, since it's
4030         static inside pt.c.
4031
4032         * typeck.c (build_modify_expr): Catch incompatible array assignment.
4033
4034         * parse.y (attribute_list, attrib): Rewrite actions to feed the
4035         right stuff to decl_attributes.
4036
4037 Thu Apr 13 11:24:10 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4038
4039         * search.c (dfs_debug_mark): Check for magic virtual like
4040         import_export_vtable.
4041
4042         * typeck.c (build_binary_op_nodefault): Don't call cp_pedwarn with
4043         four args.
4044
4045 Wed Apr 12 12:02:57 1995  Jason Merrill  <jason@deneb.cygnus.com>
4046
4047         * decl2.c (finish_file): Move prevtable pass before needs_messing_up
4048         decision.
4049
4050 Tue Apr 11 11:20:27 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4051
4052         * decl.c (finish_decl): If we're writing out a static data member of
4053         a class, we want the debug info for that class.
4054
4055         * gc.c (build_t_desc): Check linkage of a class properly.
4056
4057         * class.c (finish_struct): Set the 'headof' offset for the main
4058         vtable properly.
4059         (prepare_fresh_vtable): Fix typeinfo pointer here.
4060         (modify_one_vtable): Instead of here.
4061
4062 Mon Apr 10 12:15:59 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4063
4064         * repo.c (repo_get_id): New function to return the interesting
4065         identifier for a repo entity.
4066         (repo_template_used): Use it.
4067         (repo_template_instantiated): Mark the id as chosen.
4068         (init_repo): Record whether or not the id was chosen.
4069         (finish_repo): Note if an id was newly chosen.
4070
4071         * pt.c (do_function_instantiation): Call repo_template_instantiated.
4072         (do_type_instantiation): Ditto.  Don't diagnose multiple
4073         instantiation.
4074
4075         * decl2.c (finish_file): Use DECL_NOT_REALLY_EXTERN when deciding
4076         whether or not to synthesize a method.
4077
4078         Undo these changes:
4079         * class.c (finish_vtbls): build more vtables if flag_rtti is on.
4080         * class.c (modify_all_direct_vtables): ditto.
4081         * init.c (expand_direct_vtbls_init): expand more vtables if
4082         flag_rtti is on.
4083
4084 Sat Apr  8 17:45:41 1995  Mike Stump  <mrs@cygnus.com>
4085
4086         * gc.c (build_headof): Use ptrdiff_type_node instead of
4087         integer_type_node on pointer arithmetic.
4088
4089 Sat Apr  8 11:57:04 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4090
4091         * typeck.c (build_modify_expr): Undo previous change.
4092
4093 Thu Apr  6 01:23:50 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4094
4095         * Makefile.in (compiler): Remove ../cc1plus before rebuilding it.
4096
4097         * repo.c (get_base_filename): Put the .rpo file in the directory
4098         with the object file, not the source.
4099
4100         * typeck.c (build_conditional_expr): Handle pmf's better.
4101
4102         * repo.c (finish_repo): Also use ASM_OUTPUT_LABELREF to print out
4103         the name of the symbol.
4104
4105 Wed Apr  5 15:24:12 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4106
4107         * repo.c (open_repo_file): Make repo filename DOS-compliant.
4108         (*): Also write a new repo file if some previously-used
4109         templates are no longer used.  Only remember the identifier.
4110
4111         * lex.c (cons_up_default_function): If this function belongs to a
4112         template class, call repo_template_used for it.
4113
4114         * repo.c (repo_template_used): Using a class means using its vtable,
4115         if any.
4116         (finish_repo): Ditto.
4117
4118         * typeck.c (build_modify_expr): Only wrap TARGET_EXPRs in RTL_EXPRs
4119         if the type has a complex copy constructor.
4120
4121         * decl2.c (lang_decode_option): -frepo implies
4122         -fno-implicit-templates.
4123
4124         * decl.c (start_function): Clear current_{base,member}_init_list.
4125
4126         * lex.c (init_lex): Also unset *_eq if ! flag_operator_names.
4127
4128 Tue Apr  4 16:11:08 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4129
4130         * decl.c (struct cp_function): Add {base,member}_init_list.
4131         (push_cp_function_context): Save current_{base,member}_init_list.
4132         (pop_cp_function_context): Restore them.
4133
4134 Mon Apr  3 16:55:08 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4135
4136         * repo.c (get_base_filename): Take filename parm, fix logic bug.
4137
4138         * typeck.c (build_compound_expr): Do not warn about a compound expr
4139         in which the first expression has no side effects.
4140         (build_x_compound_expr): Warn here instead.
4141         (build_conditional_expr): Don't warn about a conditional expression
4142         between an enum and the type it promotes to.
4143
4144         * init.c (build_new): Handle initialization of arrays of builtins
4145         properly.
4146
4147 Mon Apr  3 15:08:04 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
4148
4149         * repo.c: Include config.h to get definitions of bcopy and rindex
4150         on systems that don't have them (e.g., SVR4).
4151
4152 Mon Apr  3 14:41:55 1995  Mike Stump  <mrs@cygnus.com>
4153
4154         * decl2.c (finish_table): Pass NULL_TREE instead of init to
4155         finish_decl so that it won't try and do error checking on the
4156         initializer.
4157
4158 Mon Apr  3 10:45:50 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4159
4160         * repo.c (get_base_filename): Analyze COLLECT_GCC_OPTIONS to
4161         determine whether this compile used -c -o.
4162         (open_repo_file): Use get_base_filename.  Remove the extension.
4163         (finish_repo): Spit out the values of main_input_filename,
4164         COLLECT_GCC and COLLECT_GCC_OPTIONS.
4165
4166         * parse.y (structsp): Add TYPENAME_KEYWORD complex_type_name.
4167
4168 Sun Apr  2 23:43:51 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4169
4170         * search.c (compute_access): Don't try to do access control on
4171         nested types.
4172
4173 Fri Mar 31 10:14:23 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4174
4175         * repo.c: New file to handle things repo.
4176
4177         * pt.c (instantiate_template): Call repo_template_used if the
4178         definition is accessible.
4179         (mark_function_instantiated): Split out from
4180         do_function_instantiation.
4181         (mark_class_instantiated): Split out from do_type_instantiation.
4182
4183         * parse.y (template_instantiate_once): Call repo_template_used.
4184
4185         * lex.c (lang_init): Call init_repo.
4186
4187         * decl2.c: Handle flag_use_repository.
4188         (finish_file): Call finish_repo.
4189
4190         * decl.c (start_method): Call repo_template_used if this is a
4191         template method.
4192
4193         * Makefile.in (CXX_OBJS): Add repo.o.
4194         (repo.o): Add dependencies.
4195
4196         * Make-lang.in (CXX_SRCS): Add repo.c.
4197
4198         * decl.c (start_function): If DECL_INTERFACE_KNOWN and
4199         DECL_NOT_REALLY_EXTERN are both set, unset DECL_EXTERNAL.
4200
4201         * typeck.c (build_binary_op_nodefault): Identify the invalid operand
4202         types used.
4203
4204         * decl.c (duplicate_decls): Propagate DECL_NOT_REALLY_EXTERN.
4205
4206 Thu Mar 30 17:54:42 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4207
4208         * typeck.c (build_binary_op_nodefault): Tidy up use of build_type
4209         and result_type.  When checking for comparison between signed
4210         and unsigned, use result_type rather than the (possibly shortened)
4211         type of op0.  Also, don't warn about equality comparison of a
4212         signed operand to an unsigned constant that fits in the signed
4213         type.
4214
4215         * method.c (do_build_copy_constructor): Reverse
4216         current_base_init_list after we've built it up.
4217
4218 Thu Mar 30 14:35:18 1995  Mike Stump  <mrs@cygnus.com>
4219
4220         * except.c (build_throw): Never warn about the value of throw not
4221         being used.
4222
4223 Thu Mar 30 13:16:54 1995  Mike Stump  <mrs@cygnus.com>
4224
4225         * except.c (expand_start_catch_block): Check for bad catch parameter
4226         declarations.
4227
4228 Thu Mar 30 13:06:11 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4229
4230         * decl.c (finish_function): Only set DECL_NOT_REALLY_EXTERN if
4231         DECL_EXTERNAL is not already set.
4232
4233 Thu Mar 30 11:26:24 1995  Mike Stump  <mrs@cygnus.com>
4234
4235         * method.c (emit_thunk): Let poplevel know that the last level is
4236         for a function so it can create a BLOCK_NODE and set DECL_INITIAL.
4237
4238 Thu Mar 30 11:15:06 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4239
4240         * decl2.c (import_export_inline): Don't set DECL_NOT_REALLY_EXTERN
4241         here.
4242
4243         * decl.c (grokdeclarator): OK, don't abort if we see a decl with
4244         METHOD_TYPE.
4245         (finish_function): Set DECL_EXTERNAL and DECL_NOT_REALLY_EXTERN on
4246         all deferred inlines.
4247
4248 Wed Mar 29 19:35:02 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4249
4250         * cp-tree.h (DECL_THIS_INLINE): New macro.
4251         (DECL_NOT_REALLY_EXTERN): New macro.
4252         (DECL_THIS_STATIC): New macro.
4253
4254         * decl.c: Lose all references to current_extern_inline.  Break
4255         inline semantics into DECL_INLINE for actual inlining and
4256         DECL_THIS_INLINE for the linkage wierdness.  Use DECL_THIS_STATIC.
4257         * decl2.c: Use DECL_NOT_REALLY_EXTERN to indicate that we want to
4258         emit an inline here.  Associated changes.
4259         * lex.c: Ditto.
4260         * pt.c: Ditto.
4261         * typeck.c: Ditto.
4262
4263         * call.c (build_method_call): Don't bother trying to handle inlines
4264         specially.
4265         * cvt.c (convert_to_aggr): Ditto.
4266
4267         * pt.c (do_function_instantiation): Handle instantiation of
4268         public inlines, too.
4269
4270 Wed Mar 29 16:04:25 1995  Mike Stump  <mrs@cygnus.com>
4271
4272         * except.c (init_exception_processing): Change the interface for
4273         __throw_type_match and add decl for new rtti matching routine
4274         __throw_type_match_rtti.
4275         (build_eh_type): New routine to build a run time descriptor for the
4276         expression given. 
4277         (expand_start_catch_block): Update to use new calling convention for
4278         the matcher.
4279         (expand_throw): Update to use build_eh_type.
4280
4281 Mon Mar 27 07:14:33 1995  Warner Losh   <imp@village.org>
4282
4283         * g++.c: Removed __NetBSD__ from conditional.
4284         Declare strerror if HAVE_STRERROR is defined; otherwise
4285         declare sys_errlist and sys_nerr.
4286         (my_strerror): New function.
4287
4288 Tue Mar 28 14:16:35 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4289
4290         * search.c (get_binfo): Don't try to be so clever.
4291
4292         * tree.c (copy_to_permanent): Also suspend_momentary().
4293
4294         * cvt.c (cp_convert_to_pointer): Hand off to convert_fn_pointer even
4295         if the types are the same.
4296
4297         * decl.c (start_function): Handle extern inlines more like C++ says
4298         we should.
4299
4300         * init.c (build_member_call): Hand constructor calls off to
4301         build_functional_cast.
4302
4303         * typeck2.c (build_functional_cast): Use DECL_NESTED_TYPENAME to get
4304         the name of the type.
4305
4306 Tue Mar 28 13:13:56 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
4307
4308         * decl.c (grokdeclarator): Check for the decl returned by
4309         grokfndecl to be null before using build_decl_attribute_variant.
4310
4311 Mon Mar 27 18:04:41 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
4312
4313         * init.c (build_new): Use build_pointer_type instead of
4314         TYPE_POINTER_TO.
4315
4316 Fri Mar 24 12:11:24 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4317
4318         * typeck.c (build_conditional_expr): Handle pmfs.
4319         (convert_for_assignment): Fix pmf support.
4320
4321         * cvt.c (convert_fn_ptr): Support !flag_vtable_thunks.
4322         (cp_convert_to_pointer): Handle pmfs.
4323         (cp_convert): Pass pmfs to cp_convert_to_pointer.
4324
4325         * typeck.c (common_type): Handle inheritance for pmfs.
4326
4327         * typeck2.c (build_m_component_ref): Do access control.
4328
4329         * typeck.c (comp_target_types): Check for conversion to void *
4330         before checking trickier conversions.
4331
4332         * decl.c (duplicate_decls): Propagate DECL_ABSTRACT_VIRTUAL_P.
4333
4334         * pt.c (push_tinst_level): Complain if template instantiation depth
4335         is greater than max_tinst_depth.
4336
4337         * typeck.c (common_type): Assume that we can call common_type to
4338         unify the target type of a pointer.
4339
4340 Thu Mar 23 00:48:44 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4341
4342         * decl2.c (finish_file): Don't synthesize methods at
4343         finish_vtable_prevardecl time.  Do synthesize methods that are not
4344         used, but are public and not external.
4345
4346         * cvt.c (build_type_conversion): Only give an error if for_sure.
4347
4348         * typeck.c (comp_target_types): Only support pointer conversions if
4349         nptrs > 0.
4350
4351 Wed Mar 22 19:30:15 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
4352
4353         * init.c (build_new): Catch use of an initializer list where it
4354         shouldn't be.
4355
4356 Wed Mar 22 16:21:07 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4357
4358         * init.c (build_new): Wrap alloc_expr in an RTL_EXPR if nelts is
4359         non-constant.
4360
4361         * decl2.c: temp_name_counter is now public.
4362
4363         * decl.c (struct cp_function): Add temp_name_counter field.
4364         (push_cp_function_context): Save it.
4365         (pop_cp_function_context): Restore it.
4366
4367         * typeck.c (common_type): Handle unifying function types, and unify
4368         unmatched things to void* with a compiler_error, rather than
4369         silently like before.
4370
4371 Wed Mar 22 15:10:34 1995  Mike Stump  <mrs@cygnus.com>
4372
4373         * decl2.c (finish_prevtable_vardecl, finish_vtable_vardecl): Revert
4374         Brendan's last change and fix latent problem that causes TD entries
4375         to not come out when the things that need them has yet to be
4376         expanded.
4377
4378 Wed Mar 22 15:12:00 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4379
4380         * typeck.c (build_binary_op_nodefault, comparison ops): Update type0
4381         and type1, since we might have changed op0 or op1.
4382
4383 Wed Mar 22 13:33:45 1995  Jason Merrill  <jason@python.cygnus.com>
4384
4385         * typeck.c (common_type): Don't mess up templates.
4386
4387 Wed Mar 22 04:56:00 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4388
4389         * typeck.c (common_type): Handle ptms properly.  Also handle 
4390         T* -> void*.
4391         (build_binary_op_nodefault): New variable build_type controls what
4392         type is given to the expression when it is created.  Set this to
4393         boolean_type_node for comparison ops instead of using result_type.
4394         (comp_target_types): Allow T * -> void *.
4395
4396         * cvt.c (cp_convert_to_pointer): Do access control when converting
4397         ptms, too.
4398
4399 Tue Mar 21 17:25:06 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
4400
4401         * parse.y (extern_lang_string): Catch use of linkage specs that
4402         aren't all naming the same language.
4403
4404         * class.c (finish_struct): Delete accidental duplicate code.
4405
4406 Tue Mar 21 14:00:57 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4407
4408         * typeck.c (build_binary_op_nodefault): Disable pedwarns about
4409         comparing functions and incomplete types.
4410
4411         * decl.c (finish_function): Only unset current_function_decl if
4412         !nested.
4413         (duplicate_decls): Last change went too far; we only want to stop
4414         checking for value/reference ambiguity.
4415
4416 Tue Mar 21 01:26:39 1995  Mike Stump  <mrs@cygnus.com>
4417
4418         * gc.c (build_generic_desc): Zap the DECL_SIZE so that we can lay it
4419         out fresh, as the new type may be larger.
4420
4421 Mon Mar 20 19:01:10 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4422
4423         * expr.c (extract_init): Try to expand the RTL for the
4424         initialization and figure out what it will look like so we can avoid
4425         run-time initialization.  Disabled for now.
4426         (extract_scalar_init): Helper for scalar initialization.
4427         (extract_aggr_init): Helper for aggregate initialization.
4428
4429         * decl.c (duplicate_decls): Don't complain about ambiguous
4430         declarations.
4431         (obscure_complex_init): Now returns a tree.  Call extract_init if
4432         we're optimizing and this is a toplevel decl.
4433         (finish_decl): Update accordingly.
4434
4435         * lex.c (check_newline): If we're just changing files (not pushing
4436         or popping), update input_file_stack->name.
4437
4438 Mon Mar 20 17:55:04 1995  Mike Stump  <mrs@cygnus.com>
4439
4440         * pt.c (type_unification): Only TEMPLATE_DECLs are handled right now
4441         in the transitive unification code.
4442
4443 Mon Mar 20 16:07:50 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
4444
4445         * decl.c (shadow_tag): Don't allow inline, virtual, or explicit on
4446         non-functions.
4447         (grokdeclarator): Don't allow friends to be defined in local classes.
4448
4449 Sat Mar 18 04:03:33 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4450
4451         * decl2.c (finish_prevtable_vardecl): Use DECL_DECLARED_STATIC
4452         rather than DECL_SAVED_INSNS to decide whether or not this method
4453         was declared inline.
4454
4455         * method.c (synthesize_method): Turn off DECL_INLINE if
4456         function_cannot_inline_p thinks we're too large.
4457
4458         * typeck.c (build_indirect_ref): Use build_expr_type_conversion.
4459
4460 Fri Mar 17 17:47:36 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4461
4462         * class.c (instantiate_type): Handle pmfs.
4463
4464         * typeck.c (convert_for_assignment): Check types when assigning one
4465         pmf to another.
4466
4467         * decl.c (define_label): Fix logic for printing out the name of the
4468         label in an error message.
4469
4470         * error.c (dump_expr): Support ARRAY_REF.
4471
4472 Fri Mar 17 17:43:02 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
4473
4474         * decl2.c (finish_vtable_vardecl): Call build_t_desc here.
4475         (finish_prevtable_vardecl): Instead of here.
4476
4477 Fri Mar 17 14:40:45 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4478
4479         * decl.c (expand_static_init): Also use expand_aggr_init if the
4480         initializer is a TREE_LIST.     
4481         (grokdeclarator): Only pedwarn about extra qualification if -pedantic.
4482
4483         * pt.c (unify): Fix unification of return type.
4484
4485         * expr.c (fixup_result_decl): Use store_expr, rather than
4486         emit_move_insn, to move the return value into the place where
4487         callers will expect it.
4488
4489 Thu Mar 16 22:05:25 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4490
4491         * init.c (build_offset_ref): Call assmble_external on functions.
4492         * typeck.c (build_component_ref): Ditto.
4493
4494 Thu Mar 16 20:28:16 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
4495
4496         * decl.c (struct saved_scope): Add members base_init_list and
4497         member_init_list.
4498         (push_to_top_level): Save current_base_init_list and
4499         current_member_init_list to them.
4500         (pop_from_top_level): Put it back.
4501
4502 Thu Mar 16 19:21:14 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4503
4504         * pt.c (instantiate_template): Call assemble_external.  
4505
4506 Thu Mar 16 18:07:54 1995  Brendan Kehoe  (brendan@phydeaux.cygnus.com)
4507
4508         * class.c: Include rtl.h, to get NULL_RTX.
4509         (finish_struct): Also zero out DECL_SAVED_INSNS, to avoid problems
4510         on hosts with different sizes for each part of the union.
4511         * tree.c: Also include rtl.h.
4512         (layout_basetypes): Same change for DECL_SAVED_INSNS.
4513
4514 Thu Mar 16 13:57:36 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4515
4516         * pt.c (unify): Fix array domain unification for 64-bit targets.
4517
4518         * decl2.c (finish_file): Push bizarre type decl before walking the
4519         vtables the first time.
4520         (walk_vtables): OK, don't set prev to vars if the vardecl_fn messed
4521         with TREE_CHAIN (prev).
4522
4523         * init.c (emit_base_init): Use convert_pointer_to_real instead of
4524         convert_pointer_to when converting to a direct base.
4525
4526 Wed Mar 15 20:26:29 1995  Mike Stump  <mrs@cygnus.com>
4527
4528         * pt.c (type_unification): Handle transitive unification better.
4529
4530 Wed Mar 15 13:56:16 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4531
4532         * decl2.c (walk_vtables): Always set prev to vars.
4533         (mark_vtable_entries): Call assemble_external on the vtable entries.
4534
4535         * class.c (finish_struct): Set the vtable's size to NULL_TREE before
4536         calling layout_decl, so that it gets updated properly.
4537
4538         Finally re-enable dynamic synthesis.  This time it works.
4539         * method.c (synthesize_method): Pass decl_function_context (fndecl)
4540         to {push,pop}_cp_function_context.
4541         * decl.c (push_cp_function_context): Now takes a tree argument.
4542         (pop_cp_function_context): Ditto.
4543         * call.c (build_method_call): Enable synthesis.
4544         * lex.c (cons_up_default_function): Ditto.
4545
4546 Tue Mar 14 19:14:19 1995  Doug Evans  <dje@chestnut.cygnus.com>
4547
4548         * parse.y (setattrs): Chain onto prefix_attributes rather than
4549         setting it.
4550
4551 Wed Mar 15 13:00:00 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
4552
4553         * decl.c (pushdecl): Check if the type of the VAR_DECL is an
4554         error_mark_node before trying to read TYPE_LANG_SPECIFIC. 
4555
4556 Mon Mar 13 21:00:28 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
4557
4558         * decl.c (grokdeclarator, case ARRAY_REF): Wrap the exp with fold,
4559         and convert the size and integer_one_node to the index type.
4560
4561 Mon Mar 13 08:01:02 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4562
4563         * typeck.c (get_member_function_from_ptrfunc): Save the instance
4564         argument, and tack it onto the front of the COND_EXPR to make the
4565         semantics come out right.  Grab the instance argument from
4566         '*instance_ptrptr', rather than having it passed in separately.
4567         
4568         * various: Change various consed-up comparison operations to have
4569         boolean type.  Remove the instance argument in calls to
4570         get_member_function_from_ptrfunc.
4571
4572         * error.c (dump_expr): Dump true and false as "true" and "false".
4573
4574         * decl2.c (finish_file): Also set DECL_STATIC_FUNCTION_P on the
4575         global init function.
4576
4577         * decl.c (finish_function): Only set DECL_EXTERNAL here if the
4578         inline function is public.
4579
4580 Sat Mar 11 00:58:03 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4581
4582         * init.c (is_friend): Be more careful about checking
4583         DECL_CLASS_CONTEXT on non-member functions.
4584
4585         * decl2.c (finish_vtable_vardecl): Don't bother calling
4586         assemble_external here.
4587         (prune_vtable_vardecl): New function that just splices out the
4588         vtable decl from the top-level decls.
4589         (import_export_inline): Unset DECL_EXTERNAL at first.
4590         (finish_file): Don't bother calling assemble_external here.  Do
4591         splice out all of the vtables.
4592
4593 Fri Mar 10 14:42:29 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4594
4595         * decl.c (finish_function): If we're not emitting the function yet,
4596         call assemble_external for it.
4597
4598         * decl2.c (finish_prevtable_vardecl): Don't call mark_vtable_entries
4599         here.
4600         (finish_vtable_vardecl): Don't do the linkage deduction thing here.
4601         Also don't splice out the current vtable if it is unused.
4602         (finish_file): Move the second walk_vtables and the synthesis check
4603         inside the 'reconsider' loop.  Move thunk emission after the
4604         'reconsider' loop.
4605
4606 Thu Mar  9 16:28:16 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
4607
4608         * pt.c (tsubst): Don't bother calling cp_build_type_variant, since it
4609         was passing bogus values for readonly and volatile from the original
4610         template decl, not the resultant type of the tsubst call.
4611
4612         * class.c (duplicate_tag_error): Use cp_error_at to point out the
4613         previous definition of the tag.
4614
4615 Thu Mar  9 10:46:17 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4616
4617         * decl.c (start_function): Clear base_init_insns and protect_list.
4618         (struct cp_function): Add base_init_insns field.
4619         (push_cp_function_context): Also save base_init_insns.
4620         (pop_cp_function_context): Also restore base_init_insns.
4621
4622 Wed Mar  8 13:31:44 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4623
4624         * init.c (member_init_ok_or_else): Check for initializing a static
4625         member here.
4626         (emit_base_init): Instead of here.
4627
4628 Tue Mar  7 16:03:26 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4629
4630         * call.c (build_method_call): Disable synthesis as needed.
4631         * lex.c (cons_up_default_function): Ditto.
4632
4633 Tue Mar  7 10:14:29 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
4634
4635         * parse.y: New rules to allow attributes in a prefix position.
4636         (prefix_attributes): New variable.  Pass it into cplus_decl_attributes.
4637         (setattr): New rule.
4638         (reserved_declspecs, declmods): Catch attributes here.
4639         * decl2.c (cplus_decl_attributes): Add PREFIX_ATTRIBUTES argument.
4640         * decl.c (duplicate_decls): Pass DECL_MACHINE_ATTRIBUTES to
4641         descendent typedef.
4642         (grokdeclarator): Added code to support machine attributes.
4643         * Makefile.in (stamp-parse): Expect 5 shift/reduce failures.
4644
4645 Mon Mar  6 15:07:02 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4646
4647         * call.c (build_method_call): Don't synthesize methods outside of a
4648         function.
4649
4650         Make base initialization more re-entrant so that synthesis on the
4651         fly will work (and, eventually, template instantation on the fly).
4652         * init.c (sort_member_init): Don't bother with members that can't be
4653         initialized.  Reorganize a bit.  Don't initialize base members here.
4654         (sort_base_init): New function, like sort_member_init, but for base
4655         classes.  Steals some code from emit_base_init.
4656         (emit_base_init): Simplify.  Call sort_{member,base}_init before
4657         doing any initialization, so we don't have to save
4658         current_{member,base}_init_list in push_cp_function_context.
4659         (expand_aggr_vbase_init_1): Adjust for sort_base_init.
4660         (expand_aggr_vbase_init): Simplify.
4661         * decl.c (struct cp_function): Add protect_list field.
4662         (push_cp_function_context): Also save protect_list.
4663         (pop_cp_function_context): Also restore protect_list.
4664         * call.c (build_method_call): Enable synthesis at point of call.
4665         * lex.c (cons_up_default_function): Ditto.
4666
4667         * parse.y: Turn -ansi checks back into -pedantic checks.
4668
4669         * init.c (build_new): Fix -fcheck-new for array new.
4670
4671 Sat Mar  4 15:55:42 1995  Fergus Henderson  <fjh@cs.mu.oz.au>
4672
4673         * typeck.c (build_compound_expr): warn if left-hand operand of
4674         comma expression has no side-effects.
4675
4676 Fri Mar  3 15:16:45 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4677
4678         * parse.y (primary): Change 'object qualified_id *' rules to 'object
4679         overqualified_id *'.
4680
4681 Fri Mar  3 12:48:17 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
4682
4683         * parse.y (unary_expr): Catch doing sizeof an overloaded function.
4684         Make the error look the same as the one we issue in c_sizeof.
4685
4686         * typeck.c (build_binary_op_nodefault): Give an error for trying
4687         to compare a pointer-to-member to `void *'.
4688
4689 Fri Mar  3 11:28:50 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4690
4691         * typeck.c (build_unary_op): Handle bool increment with smoke and
4692         mirrors here, rather than in expand_increment where it belongs,
4693         because Kenner doesn't agree with me.
4694
4695 Fri Mar  3 00:08:10 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
4696
4697         * decl.c (grokparms): Catch a PARM_DECL being used for a default
4698         argument as well.
4699
4700 Thu Mar  2 20:05:54 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
4701
4702         * init.c (build_new): Don't allow new on a function type.
4703
4704         * parse.y (primary): Avoid a crash when seeing if the arg is of
4705         the same type as that given for the typespec in an explicit dtor call.
4706
4707 Thu Mar  2 00:49:38 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4708
4709         * decl.c (finish_function): Change test for calling
4710         mark_inline_for_output.
4711
4712 Wed Mar  1 11:23:46 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4713
4714         * typeck.c (build_modify_expr): Complain if
4715         build_default_binary_type_conversion fails.
4716
4717         * init.c (expand_default_init): Handle arguments of unknown type
4718         properly.
4719
4720         * cvt.c (build_expr_type_conversion): Only complain about ambiguity
4721         if 'complain'.
4722         * various: Pass 'complain'.
4723
4724         * typeck.c (comptypes): Be more picky about comparing UPTs.
4725
4726 Wed Mar  1 11:03:41 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
4727
4728         * decl.c (grokdeclarator): If declarator is null, say that the
4729         type used has an incomplete type.
4730
4731 Wed Mar  1 10:06:20 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4732
4733         * pt.c (instantiate_template): Copy the template arguments to the
4734         permanent_obstack.  Also use simple_cst_equal to compare them when
4735         looking for a previous instantiation.
4736
4737         * tree.c (make_deep_copy): Support copying INTEGER_TYPEs (assuming
4738         they are array domain types).
4739
4740 Tue Feb 28 23:24:55 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4741
4742         * cp-tree.h: Define WANT_* constants for passing to
4743         build_expr_type_conversion.
4744         * cvt.c (build_expr_type_conversion): New function to build
4745         conversion to one of a group of suitable types.
4746         (build_default_binary_type_conversion): Use it.
4747         * decl2.c (grok_array_decl): Ditto.
4748         * typeck.c (build_unary_op): Ditto.
4749         (build_array_ref): Tidy up a bit.
4750         (build_binary_op): Ditto.
4751
4752 Tue Feb 28 19:57:31 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
4753
4754         * decl.c (grokdeclarator): Don't allow decl of an argument as `void'.
4755
4756 Tue Feb 28 17:23:36 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4757
4758         * parse.y (typed_declspecs1): Add 'typespec reserved_typespecquals
4759         reserved_declspecs' rule.
4760
4761         * parse.y (expr_or_declarator): Remove notype_qualified_id rule.
4762         (direct_notype_declarator): Ditto.
4763         (complex_direct_notype_declarator): Add notype_qualified_id rule.
4764
4765         * lex.c (real_yylex): Handle :> digraph properly.
4766
4767 Tue Feb 28 12:26:29 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
4768
4769         * decl.c (grokdeclarator): Check if it's a friend, not if it's
4770         non-virtual, that's being initialized.  Move the check up to
4771         before FRIENDP would get cleared.  Catch an unnamed var/field
4772         being declared void.  Say just `field' instead of `structure field'
4773         in the error message.  Only go for the operator name if DECLARATOR
4774         is non-null.
4775
4776 Tue Feb 28 00:08:01 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4777
4778         * decl.c (start_function): Complain about abstract return type.
4779         (grokdeclarator): Complain about declaring constructors and
4780         destructors to be const or volatile.  Complain about declaring
4781         destructors to be static.
4782
4783         * pt.c (uses_template_parms): Handle pmfs.
4784
4785         * decl.c (grokdeclarator): Don't call variable_size for array bounds
4786         that only depend on template constant parameters.
4787
4788 Mon Feb 27 15:38:16 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
4789
4790         * error.c (dump_decl): Only look to see if it's a vtable if we
4791         actually have a name to check out.
4792
4793 Mon Feb 27 13:37:53 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4794
4795         * cvt.c (convert_to_aggr): Lose misleading shortcut.
4796
4797 Sun Feb 26 17:27:32 1995  Doug Evans  <dje@canuck.cygnus.com>
4798
4799         * decl.c (set_nested_typename): Always set DECL_IGNORED_P,
4800         not just for dwarf.
4801
4802 Sun Feb 26 00:10:18 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
4803
4804         * decl.c (grokdeclarator): Don't allow a static member to be
4805         declared `register'.
4806
4807         * init.c (make_friend_class): Move up to a pedwarn for the warning
4808         about a class declaring friends with itself.
4809
4810         * decl.c (grokdeclarator): You can't do `volatile friend class foo'
4811         or `inline friend class foo'.  Only try to make a friend out of
4812         TYPE if we didn't already reset it to integer_type_node.
4813
4814 Sat Feb 25 22:32:03 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
4815
4816         * decl.c (grokdeclarator): Don't allow initialization of a
4817         non-virtual function.
4818
4819         * decl.c (start_function): Do a pedwarn if we're changing `main'
4820         to have an int return type.
4821
4822 Sat Feb 25 00:02:05 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4823
4824         * typeck.c (build_modify_expr): Handle simple assignment from
4825         TARGET_EXPRs by building up an RTL_EXPR to force expansion.  Whew.
4826
4827 Fri Feb 24 18:27:14 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
4828
4829         * decl.c (grokdeclarator): Also don't allow virtual outside of a
4830         class decl for a scope method definition performed at global binding.
4831
4832         * init.c (build_offset_ref): Don't allow creation of an OFFSET_REF
4833         of a bitfield.
4834
4835         * decl.c (grokdeclarator): Don't allow a const to be declared mutable.
4836
4837         * typeck.c (build_binary_op): Return an error_mark_node if either
4838         one of the args turned into an error_mark_node when we tried to
4839         use default_conversion.
4840
4841         * typeck.c (build_unary_op): Forbid using postfix -- on a bool.
4842
4843         * decl.c (grokdeclarator): Allow `signed' and `unsigned' to be
4844         used on `__wchar_t'.
4845
4846 Fri Feb 24 13:59:53 1995  Mike Stump  <mrs@cygnus.com>
4847
4848         * except.c (end_protect_partials): Do it the right way.
4849
4850 Wed Feb 22 15:42:56 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4851
4852         * typeck.c (build_binary_op_nodefault): Upgrade warning about
4853         comparing distinct pointer types to pedwarn.
4854
4855         * typeck2.c (digest_init): Cope with extra braces.
4856
4857         * typeck.c (build_binary_op_nodefault): Use tree_int_cst_sgn instead
4858         of INT_CST_LT (..., interger_zero_node).
4859
4860 Wed Feb 22 14:45:52 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
4861
4862         * except.c [!TRY_NEW_EH] (end_protect_partials): Define dummy
4863         function for systems that don't have EH.
4864
4865 Tue Feb 21 19:18:31 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4866
4867         * call.c (can_convert_arg): Like can_convert, but takes an arg as
4868         well.
4869
4870         * pt.c (type_unification): Allow implicit conversions for parameters
4871         that do not depend on template parameters.
4872
4873 Tue Feb 21 18:43:48 1995  Douglas Rupp  (drupp@cs.washington.edu)
4874
4875         * Make-lang.in, config-lang.in: ($exeext): New macro.
4876         * Make-lang.in: Try a "cp" if "ln" fails.
4877         * cp-tree.h (decl_attributes): Added argument.
4878         * decl2.c (cplus_decl_attribute): Add arg to decl_attributes.
4879         * cp/g++.c: Added #ifdefs for sys/file.h and process.h for NT.
4880         Modified spawnvp to have to correct number of arguments for OS/2, NT.
4881
4882 Tue Feb 21 18:36:55 1995  Mike Stump  <mrs@cygnus.com>
4883
4884         * decl.c (finish_function): Add calls to end_protect_partials to end
4885         the exception region that protects constructors so that partially
4886         constructed objects can be partially destructed when the constructor
4887         throws an exception.
4888         * init.c (perform_member_init, sort_member_init, emit_base_init):
4889         Added support for partially constructed objects.
4890         * init.c (build_partial_cleanup_for): New routine to do partial
4891         cleanups of a base class.
4892         * decl2.c (finish_file): Move the emitting of the exception table
4893         down, after we emit all code that might have exception regions in
4894         them.
4895         * except.c (end_protect_partials, might_have_exceptions_p): New
4896         routines.
4897         (emit_exception_table): Always output table if called.
4898         * cp-tree.h (protect_list, end_protect_partials,
4899         might_have_exceptions_p, emit_exception_table): Added.
4900
4901 Tue Feb 21 16:05:59 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
4902
4903         * gc.c (build_typeid): Pass a NULL_TREE, not the bogus, unused
4904         address of a local variable.
4905         * class.c (build_vfn_ref): Only try to build the PLUS_EXPR if we
4906         were given a non-null PTR_TO_INSTPTR.
4907
4908 Tue Feb 21 01:53:18 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4909
4910         * decl.c (duplicate_decls): Always lay out the merged decl.
4911
4912         * decl2.c (finish_vtable_vardecl): Don't do vtable hack on templates.
4913         (finish_prevtable_vardecl): Ditto.
4914
4915         * method.c (synthesize_method): Set interface_{unknown,only}
4916         according to the settings for our class, not the file where it comes
4917         from.
4918
4919 Sat Feb 18 12:26:48 1995  Mike Stump  <mrs@cygnus.com>
4920
4921         * except.c: Handle systems that define __i386__ but not __i386.
4922
4923 Fri Feb 17 15:31:31 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4924
4925         * decl2.c (reparse_decl_as_expr): Support being called without a
4926         type argument.
4927
4928         * parse.y (primary): Add '(' expr_or_declarator ')'.  Adds 4 r/r
4929         conflicts.  Sigh.
4930
4931 Fri Feb 17 12:02:06 1995  Mike Stump  <mrs@cygnus.com>
4932
4933         * parse.y (template_def, fndef, fn.def1, return_init, condition,
4934         initdcl0, initdcl, notype_initdcl0, nomods_initdcl0,
4935         component_decl_1, after_type_component_declarator0,
4936         notype_component_declarator0, after_type_component_declarator,
4937         notype_component_declarator, after_type_component_declarator,
4938         full_parm, maybe_raises, exception_specification_opt): Fix up,
4939         include exception_specification_opt maybeasm maybe_attribute and
4940         maybe_init if missing.  Rename maybe_raises to
4941         exception_specification_opt to match draft wording.  Use maybe_init
4942         to simplify rules.
4943
4944 Fri Feb 17 01:54:46 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4945
4946         * init.c (build_new): Set TREE_NO_UNUSED_WARNING on COMPOUND_EXPRs
4947         built for news of scalar types.
4948
4949 Thu Feb 16 17:48:28 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4950
4951         * typeck.c (build_binary_op_nodefault): Update code for warning
4952         about signed/unsigned comparisons from C frontend.  Realize that the
4953         code in the C frontend is, if anything, even more bogus.  Fix it.
4954         (build_binary_op): Undo default_conversion if it wasn't useful.
4955
4956         * typeck.c (build_unary_op, ADDR_EXPR): Lose bogus special case for
4957         PRE*CREMENT_EXPR.
4958
4959         * decl2.c (import_export_vtable): Don't try the vtable hack
4960         if the class doesn't have any real non-inline virtual functions.
4961         (finish_vtable_vardecl): Don't bother trying to find a non-inline
4962         virtual function in a non-polymorphic class.
4963         (finish_prevtable_vardecl): Ditto.
4964
4965         * decl2.c (import_export_vtable): Use and set DECL_INTERFACE_KNOWN.
4966
4967         * cp-tree.h (DECL_INTERFACE_KNOWN): Use DECL_LANG_FLAG_5.
4968
4969         * init.c (expand_virtual_init): Always call assemble_external.
4970
4971         * class.c (build_vfn_ref): Always call assemble_external.
4972         (build_vtable): Always call import_export_vtable.
4973         (prepare_fresh_vtable): Ditto.
4974         (add_virtual_function): Don't bother setting TREE_ADDRESSABLE.
4975
4976 Thu Feb 16 03:28:49 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4977
4978         * class.c (finish_struct): Use TYPE_{MIN,MAX}_VALUE to determine
4979         whether an enumerated type fits in a bitfield.
4980
4981 Wed Feb 15 15:38:12 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4982
4983         * class.c (grow_method): Update method_vec after growing the class
4984         obstack.
4985
4986 Wed Feb 15 13:42:59 1995  Mike Stump  <mrs@cygnus.com>
4987
4988         * parse.y (handler_seq): Push a level for the catch parameters.
4989
4990 Wed Feb 15 12:42:57 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4991
4992         * init.c (emit_base_init): Update BINFO_INHERITANCE_CHAIN on my
4993         bases, in case they've been clobbered.
4994
4995 Wed Feb 15 12:07:29 1995  Mike Stump  <mrs@cygnus.com>
4996
4997         * class.c (finish_base_struct): Set up BINFO_INHERITANCE_CHAIN here,
4998         so that one day it will always be valid.
4999         * tree.c (propagate_binfo_offsets, layout_vbasetypes): Ditto.
5000
5001         * cp-tree.h (copy_binfo): Removed, unused.
5002         * tree.c (copy_binfo): Ditto.
5003
5004 Wed Feb 15 00:05:30 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5005
5006         * init.c (build_new): Save the allocation before calling
5007         expand_vec_init on it.
5008
5009         * decl.c (finish_enum): The TYPE_PRECISION of the enum type mush
5010         match the TYPE_PRECISION of the underlying type for constant folding
5011         to work.
5012
5013 Tue Feb 14 15:31:25 1995  Mike Stump  <mrs@cygnus.com>
5014
5015         * except.c (push_eh_entry, expand_start_all_catch,
5016         expand_leftover_cleanups, expand_end_catch_block): Keep track of
5017         the context in which the exception region occurs.
5018         (build_exception_table): If the region was not output, don't output
5019         the entry in the eh table for it.
5020
5021 Tue Feb 14 02:15:43 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5022
5023         * init.c (expand_default_init): Only use a previous constructor call
5024         if it's a call to our constructor.  Does the word "Duh" mean
5025         anything to you?
5026
5027         * decl.c (grokparms): Fine, just don't call
5028         convert_for_initialization at all.  OK?  Happy now?
5029
5030 Mon Feb 13 02:23:44 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5031
5032         * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Make sure that the class
5033         method vector has a second element before returning it.
5034
5035         * decl.c (grokparms): Don't strip REFERENCE_TYPE before calling
5036         convert_for_initialization.
5037
5038 Sun Feb 12 03:57:06 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5039
5040         * typeck.c (build_modify_expr): Compare function name to
5041         constructor_name (current_class_type) instead of current_class_name.
5042
5043         * decl.c (grokparms): Don't do anything with the return value of
5044         convert_for_initialization.
5045
5046         * error.c (dump_decl): Also dump_readonly_or_volatile on the decl.
5047
5048         * decl.c (duplicate_decls): Tweak error message.
5049
5050         * typeck.c (build_const_cast): Implement checking.
5051         (build_reinterpret_cast): Implement some checking.
5052
5053         * cp-tree.h (CONV_FORCE_TEMP): Require a new temporary when
5054         converting to the same aggregate type.
5055         (CONV_STATIC_CAST): Include it.
5056         (CONV_C_CAST): Ditto.
5057         * cvt.c (convert_force): Use CONV_C_CAST instead of CONV_OLD_CONVERT.
5058         (cp_convert): Only force a new temporary if CONV_FORCE_TEMP.
5059
5060 Fri Feb 10 16:18:52 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5061
5062         * typeck.c (build_c_cast): Use non_lvalue to tack something on
5063         where necessary.
5064
5065         * decl.c (auto_function): Now a function.
5066         * except.c (init_exception_processing): terminate, unexpected,
5067         set_terminate, and set_unexpected have C++ linkage.
5068
5069         * typeck.c (build_unary_op, TRUTH_NOT_EXPR): Use convert instead of
5070         truthvalue_conversion for converting to bool, as it handles
5071         user-defined conversions properly.
5072         (condition_conversion): Ditto.
5073
5074         * except.c (expand_throw): Don't call convert_to_reference.
5075         Pass the correct parameters to build_new.
5076
5077         * method.c (do_build_assign_ref): Don't use access control when
5078         converting to a base reference here.
5079         (do_build_copy_constructor): Or here.
5080
5081         * init.c (build_new): Unset TREE_READONLY on the dereferenced
5082         pointer before assigning to it.
5083
5084         * decl.c (maybe_build_cleanup): Don't bother stripping const here.
5085
5086         * decl2.c (delete_sanity): You can now delete pointer to const.
5087
5088 Fri Feb 10 13:28:38 1995  Jason Merrill  <jason@python.cygnus.com>
5089
5090         * decl.c (finish_function): Don't rely on actual parameters being
5091         evaluated left-to-right.
5092         * except.c (expand_end_catch_block): Ditto.
5093
5094 Fri Feb 10 00:52:04 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5095
5096         * tree.c (real_lvalue_p): Like lvalue_p, but class temps aren't
5097         considered lvalues.
5098         * cvt.c (convert_to_reference): Use real_lvalue_p instead of
5099         lvalue_p.
5100
5101         * cvt.c (build_type_conversion_1): Don't call convert on aggregate
5102         types.
5103         (convert_to_reference): Fix erroneous text substitution.
5104
5105         * typeck2.c (initializer_constant_valid_p): Update from C frontend.
5106         Add new argument to all callers.
5107
5108         * typeck.c (convert_arguments): Check for error_mark_node before
5109         trying to do anything with the actual parameter.
5110
5111         * typeck.c (condition_conversion): Build up a CLEANUP_POINT_EXPR and
5112         fold it.
5113         (bool_truthvalue_conversion): Remove.  Fix all callers to call
5114         truthvalue_conversion instead.
5115         (various): Fold CLEANUP_POINT_EXPRs.
5116
5117         * parse.y (conditions): Call condition_conversion rather than
5118         building up a CLEANUP_POINT_EXPR.
5119
5120         * pt.c (end_template_decl): Don't warn_if_unknown_interface here
5121         under -falt-external-templates.
5122
5123 Thu Feb  9 05:24:10 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5124
5125         * init.c (build_new): Complain about new of const type without
5126         initializer.  Other cleanup.
5127
5128         * call.c (compute_conversion_costs): Don't call
5129         build_type_conversion with a reference type; convert to the target
5130         type and check its lvaluetude.
5131         * cvt.c (convert_to_reference): Ditto.
5132
5133         * cvt.c (build_type_conversion_1): There will never be any need to
5134         dereference references here now.
5135
5136 Thu Feb  9 00:37:47 1995  Mike Stump  <mrs@cygnus.com>
5137
5138         * except.c (expand_builtin_throw): Make sure we only `use' the
5139         value of return_val_rtx.
5140
5141 Wed Feb  8 15:45:55 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5142
5143         * parse.y (structsp): Don't complain about declaring a type being
5144         defined to be a friend.
5145
5146         * decl2.c (warn_if_unknown_interface): Note the template in question
5147         and the point of instantiation, for -falt-external-templates.
5148         * lex.c (reinit_parse_for_method): Pass the decl to
5149         warn_if_unknown_interface.
5150         * pt.c (instantiate_template): Ditto.
5151         (end_template_decl): Ditto.
5152
5153         * decl.c (set_nested_typename): Set IDENTIFIER_TYPE_VALUE on the
5154         nested name again, to make local classes work a bit better.
5155
5156         * typeck.c (build_function_call_real): Dereference reference after
5157         checking for incomplete type.
5158
5159         * init.c (build_new): Accept new of const and volatile types.
5160
5161 Wed Feb  8 14:04:16 1995  Jason Merrill  <jason@deneb.cygnus.com>
5162
5163         * decl.c (grokdeclarator): Fix error message.
5164
5165 Wed Feb  8 03:16:15 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5166
5167         * typeck.c (convert_for_initialization): Do bash arrays when
5168         converting to a reference to non-array.
5169
5170 Tue Feb  7 15:50:33 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5171
5172         * cvt.c (cp_convert): Don't call convert_to_reference, or
5173         automatically dereference references.  Do pass reference conversions
5174         to cp_convert_to_pointer.
5175         (cp_convert_to_pointer): Support references.
5176
5177         * call.c (build_method_call): Don't build up a reference to the
5178         parameter here; let build_overload_call handle that.
5179
5180         * typeck.c (build_c_cast): Call convert_to_reference directly if
5181         converting to a reference type.
5182         * method.c (do_build_copy_constructor): Ditto.
5183         * method.c (do_build_copy_constructor): Ditto.
5184         (do_build_assign_ref): Ditto.
5185
5186         * call.c (build_method_call): Dereference a returned reference.
5187         * typeck.c (build_function_call_real): Ditto.
5188
5189         * decl.c (xref_basetypes): Check for unions with basetypes here.
5190         (xref_tag): Instead of here.
5191
5192         * pt.c (process_template_parm): Template type parm decls are
5193         artificial.
5194
5195 Mon Feb  6 04:32:09 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5196
5197         * parse.y (typed_declspecs): Add missing semicolon.
5198         (do_xref_defn): Resurrect.
5199         (named_class_head_sans_basetype): Move template specialization
5200         definition cases to named_class_head_sans_basetype_defn.
5201
5202         * decl2.c (grokfield): Call pushdecl_class_level after setting the
5203         TYPE_NAME, not before.
5204
5205 Sun Feb  5 02:50:45 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5206
5207         * call.c (convert_harshness): Don't call sorry here.  Don't allow
5208         conversions between function pointer types if pedantic.
5209
5210         * pt.c (overload_template_name): Pass globalize=1 to xref_tag.
5211
5212         * lex.c (cons_up_default_function): Use the full name for the return
5213         type of op=.
5214
5215         * decl.c (set_nested_typename): Don't worry about anonymous types,
5216         as they already have a unique name.
5217         (pushdecl): Remove redundant set_nested_typename
5218         (xref_tag): Split out base handling into xref_basetypes.
5219
5220         * cp-tree.h (TYPE_INCOMPLETE): New macro; TEMPLATE_TYPE_PARMs are
5221         not considered incomplete even though their definition is unknown.
5222
5223         * decl.c (xref_defn_tag): Lose.
5224         (xref_tag): xref_next_defn = ! globalize.
5225         (pushdecl): Don't set DECL_NESTED_TYPENAME on artificial decls.  The
5226         ones that should have it set will have it set by pushtag.
5227         (pushdecl_class_level): Ditto.
5228         (pushtag): Tidy up a bit.
5229         (set_nested_typename): Push a decl for the nested typename from
5230         here, rather than from xref_defn_tag.
5231
5232         * parse.y (do_xref): Lose.
5233         (named_class_head): If we see 'class foo:' we know it's a
5234         definition, so don't worry about base lists for non-definitions.
5235
5236         * pt.c (push_template_decls): Template parm decls are artificial.
5237
5238         * decl.c (duplicate_decls): Restore check for qualifier
5239         disagreement for non-functions.
5240         (decls_match): Remove check for qualifier disagreement.
5241
5242 Fri Feb  3 14:58:58 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5243
5244         * decl.c (grok_reference_init): Convert initializer from
5245         reference.
5246         * typeck.c (convert_for_initialization): Ditto.
5247
5248         * decl.c (duplicate_decls): Propagate DECL_NESTED_TYPENAME.
5249
5250         * cvt.c (cp_convert): Don't convert to the same class type by just
5251         tacking on a NOP_EXPR.
5252         (convert_to_reference): Use comp_target_types instead of comptypes
5253         so that we don't allow conversions two levels down.
5254
5255 Thu Feb  2 15:07:58 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5256
5257         * class.c (build_vbase_path): Bash types to make the backend happy.
5258         * cvt.c (build_up_reference): Bash the types bashed by
5259         build_vbase_path to be reference types instead of pointer types.
5260         (convert_to_reference): Ditto.
5261
5262         * typeck.c (build_c_cast): Don't strip NOPs if we're converting to a
5263         reference type.
5264
5265         * parse.y (structsp): Put back error for 'struct B: public A;'.
5266
5267 Wed Feb  1 23:02:06 1995  Mike Stump  <mrs@cygnus.com>
5268
5269         * except.c: Add support for mips systems that don't define __mips
5270         but do define mips, like Ultrix.
5271
5272 Wed Feb  1 22:39:07 1995  Mike Stump  <mrs@cygnus.com>
5273
5274         * except.c: Add support for exception handling on the Alpha.
5275
5276 Wed Feb  1 10:12:14 1995  Mike Stump  <mrs@cygnus.com>
5277
5278         * decl2.c (finish_file): Fix bug in Jan 31st change.
5279
5280 Tue Jan 31 16:59:15 1995  Gerald Baumgartner  (gb@lorenzo.cs.purdue.edu)
5281
5282         * sig.c (build_signature_pointer_or_reference_type): Don't set
5283         IS_AGGR_TYPE for signature pointers/reference so expand_default_init
5284         doesn't expect to find a copy constructor.
5285         * call.c (build_method_call): Treat signature pointers/reference
5286         as if IS_AGGR_TYPE were set.
5287
5288 Tue Jan 31 13:28:56 1995  Mike Stump  <mrs@cygnus.com>
5289
5290         * gc.c (get_typeid): Pawn off error messages to build_t_desc.
5291         (build_t_desc): Inform the user here if they try and build
5292         with -frtti and don't include <typeinfo.h>.
5293
5294         * decl2.c (finish_prevtable_vardecl): Support rescanning.
5295         (finish_file): Move finish_prevtable_vardecl up to before the global
5296         initializers are done as tdecls are initialized in the global
5297         initializer.  Also Pick up any new tdecls or vtables needed by
5298         synthesized methods.
5299
5300         * class.c (finish_struct): Simplify.  We have to do rtti scanning at
5301         end, so we might as well do all of it there.
5302
5303 Tue Jan 31 05:35:02 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5304
5305         * call.c (build_method_call): Fix -fthis-is-variable for 32-bit
5306         targets, too.
5307
5308 Tue Jan 31 00:11:04 1995  Mike Stump  <mrs@cygnus.com>
5309
5310         * decl2.c (finish_prevtable_vardecl): New routine, mostly split from
5311         finish_vtable_vardecl.  It has the first half functionality from
5312         that routine.
5313         * decl2.c (finish_vtable_vardecl): Update to not include stuff not
5314         in  finish_prevtable_vardecl.
5315         * decl2.c (finish_file): Call finish_prevtable_vardecl.
5316         * gc.c (build_generic_desc): Allow it to be called when not at the
5317         global binding layer, but behave as if we were.
5318         (build_t_desc): Rearrange a bit so that it really works and is
5319         easier to follow.
5320         * class.c (finish_struct): Don't decide on tdecls here, as we have
5321         to wait until the end of the file in general to decide whether or
5322         not they come out.
5323
5324 Mon Jan 30 01:00:40 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5325
5326         * init.c (build_delete): Check access to operator delete before
5327         calling the destructor.
5328         * method.c (build_opfncall, DELETE_EXPR): build_method is allowed to
5329         return error_mark_node.
5330         * call.c (build_method_call): Use the one-argument op delete even if
5331         it's an error.
5332
5333         * init.c (build_new): Fix -fthis-is-variable support.
5334         * call.c (build_method_call): Ditto.
5335
5336         * call.c (convert_harshness): Make conversion from a pointer to bool
5337         worse than conversion to another pointer.
5338
5339 Sat Jan 28 16:46:10 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5340
5341         * init.c (build_new): Check new return value if -fcheck-new.
5342
5343         * lex.c (check_newline): Clear end_of_file when we're done, too.
5344
5345 Sat Jan 28 10:38:39 1995  Mike Stump  <mrs@cygnus.com>
5346
5347         * decl2.c (finish_vtable_vardecl): Make rtti TD tables follow
5348         vtables whereever they go.
5349
5350         * gc.c (build_t_desc): Remove old way of setting it up, as it wasn't
5351         right.
5352
5353 Sat Jan 28 09:10:44 1995  Mike Stump  <mrs@cygnus.com>
5354
5355         * decl2.c (finish_vtable_vardecl): Now set the
5356         interface/implementation of vtables on the first virtual function,
5357         if one exists, otherwise we use the old method.  This is a major win
5358         in terms of cutting down the size of objects and executables in
5359         terms of text space and data space.  Now most of the savings that
5360         #pragma interface/implementation gives is automatic in a fair number
5361         of cases.
5362
5363 Sat Jan 28 04:57:33 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5364
5365         * decl.c (grokdeclarator): Discard the template parameters in a
5366         template constructor declaration so that the function is always
5367         named constructor_name (ctype).
5368
5369         * lex.c (check_newline): Use ungetc to put back the character before
5370         calling HANDLE_PRAGMA.
5371
5372 Fri Jan 27 17:23:47 1995  Mike Stump  <mrs@cygnus.com>
5373
5374         * decl2.c (check_classfn): If the cname is T<int> and fn_name is T,
5375         make sure we still match them.
5376
5377 Fri Jan 27 16:32:10 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5378
5379         * parse.y: Add END_OF_LINE token.
5380
5381         * lex.c (check_newline): Set linemode when we see a # directive, and
5382         unset it when we're done.  Turn all 'return's into 'goto skipline'.
5383         Fix all uses of '\n', since we won't see it anymore.  Put back the
5384         character we read before checking for a sysv or target pragma.
5385         (real_yylex): If we see an EOF in linemode, return END_OF_LINE.
5386         (handle_sysv_pragma): Don't look at the input stream; quit when we
5387         see an END_OF_LINE token.
5388
5389         * input.c (getch): Return EOF if we're in line mode and at the end
5390         of a line.
5391         (put_back): Don't put back an EOF.
5392
5393 Thu Jan 26 19:26:34 1995  Mike Stump  <mrs@cygnus.com>
5394
5395         * except.c (expand_throw): Do the newing of the exception object
5396         before we load the type descriptor or the address so that we don't
5397         wipe any of the values out.
5398
5399 Thu Jan 26 19:20:00 1995  Mike Stump  <mrs@cygnus.com>
5400
5401         * except.c (init_exception_processing): Don't use r12 on the rs6000.
5402
5403 Tue Jan 24 16:36:31 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5404
5405         * decl.c (grokparms): Don't try to build up a reference at this point.
5406
5407         * typeck2.c (build_functional_cast): Don't assume that a NOP_EXPR
5408         will suffice to convert from integer_zero_node.
5409
5410 Wed Jan 25 15:02:09 1995  David S. Miller  (davem@nadzieja.rutgers.edu)
5411
5412         * class.c (instantiate_type): Change error message text.
5413         * typeck2.c (store_init_value): Likewise.
5414
5415 Mon Jan 23 21:57:14 1995  Mike Stump  <mrs@cygnus.com>
5416
5417         * pt.c (tsubst): When we copy a node, don't forget to copy
5418         TREE_CHAIN, we use it later.
5419
5420 Mon Jan 23 03:33:47 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5421
5422         * typeck.c (convert_for_assignment): Initialize variable before use.
5423
5424 Fri Jan 20 01:17:59 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5425
5426         * g++.c (main): Link with both libstdc++ and libg++ if called as
5427         something ending with "g++", otherwise only libstdc++.  Move -lm to
5428         the end of the line.
5429
5430 Thu Jan 19 15:43:11 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5431
5432         * call.c (build_method_call): Don't mess with 'this' before calling
5433         compute_conversion_costs.
5434
5435 Wed Jan 18 15:40:55 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5436
5437         * search.c (get_matching_virtual): Give line number for previous
5438         declaration.
5439
5440         * call.c (convert_harshness): Handle conversions to references
5441         better.
5442
5443         * cvt.c (build_up_reference): OK, handle {MIN,MAX}_EXPR *properly*.
5444
5445 Wed Jan 18 15:21:38 1995  Mike Stump  <mrs@cygnus.com>
5446
5447         * class.c (instantiate_type): Use DECL_CHAIN to walk lists instead,
5448         as the TREE_CHAIN for methods will take us to the next differently
5449         named function, DECL_CHAIN won't.
5450
5451 Wed Jan 18 14:26:59 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5452
5453         * tree.c (lvalue_p): Handle {MIN,MAX}_EXPR.
5454
5455         * decl2.c (lang_decode_option): -Wall implies -Wparentheses.
5456         warn_parentheses defaults to 0.
5457
5458         * decl.c (grokparms): Put back call to require_instantiated_type.
5459
5460 Tue Jan 17 19:56:15 1995  Mike Stump  <mrs@cygnus.com>
5461
5462         * except.c (exception_section): Use the data section on the rs6000.
5463         Change calling convention for named_section.
5464
5465 Wed Jan 17 18:20:57 1994  Fergus Henderson <fjh@munta.cs.mu.oz.au>
5466
5467         * cp-tree.h : Make if (x=0) warn with wall
5468         * parse.y : Make if (x=0) warn with wall
5469
5470 Tue Jan 17 14:12:00 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5471
5472         * decl.c (BOOL_TYPE_SIZE): BITS_PER_WORD if SLOW_BYTE_ACCESS,
5473         BITS_PER_UNIT otherwise.
5474
5475         * search.c (get_matching_virtual): Don't check the binfo if the
5476         types are the same.
5477
5478         * cvt.c (cp_convert): Just call truthvalue_conversion to convert to
5479         bool.
5480
5481 Mon Jan 16 13:28:48 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5482
5483         * various: Use boolean_type_node, boolean_true_node,
5484         boolean_false_node.
5485
5486         * search.c (get_matching_virtual): Allow covariant returns that
5487         don't require pointer adjustment.
5488
5489         * typeck.c (build_conditional_expr): Don't call default_conversion
5490         on ifexp.
5491
5492         * cvt.c (build_up_reference): Handle MIN_EXPR and MAX_EXPR.
5493
5494         * decl.c (grokdeclarator): Upgrade warning about &const to pedwarn.
5495
5496 Sun Jan 15 22:17:32 1995  dcb@lovat.fmrco.COM (David Binderman)
5497
5498         * pt.c (do_function_instantiation): Free targs once we're done.
5499
5500 Sun Jan 15 22:17:32 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5501
5502         * decl.c (BOOL_TYPE_SIZE): Defaults to BITS_PER_WORD.
5503         (init_decl_processing): Use BOOL_TYPE_SIZE instead of CHAR_TYPE_SIZE
5504         for bool.
5505
5506 Sat Jan 14 05:33:55 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5507
5508         * decl2.c (finish_file): We need to mess up if there are any
5509         variables in the list, not just if there is one with a constructor.
5510
5511 Fri Jan 13 14:42:55 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5512
5513         * decl.c (duplicate_decls): Propagate DECL_STATIC_{CON,DE}STRUCTOR.
5514         (finish_function): Handle DECL_STATIC_{CON,DE}STRUCTOR.
5515         (finish_function): Trust rest_of_compilation.
5516
5517         * decl2.c (finish_file): Also call functions designated as static
5518         constructors/destructors.
5519
5520         * decl.c (grokdeclarator): Allow access decls of operator functions.
5521         (grokparms): Only do convert_for_initialization if the initializer
5522         has a type.
5523         (duplicate_decls): Put back push_obstacks_nochange call.
5524
5525         * lex.c (real_yylex): Downgrade complaint about the escape sequence
5526         being too large from pedwarn to warning.
5527
5528         * decl.c (grokdeclarator): Don't complain about long long in system
5529         headers.
5530
5531         * lex.c (real_yylex): Handle digraphs.
5532
5533 Thu Jan 12 12:17:24 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5534
5535         * decl.c (init_decl_processing): -f{no-,}strict-prototype only
5536         affects C linkage declarations now.
5537
5538         * typeck.c (comp_target_types): Grok simple contravariant conversions.
5539         (common_type): t1 and t2 are interchangeable.
5540
5541         * various: Test return value of comp_target_types differently in
5542         different places; it now returns -1 for a contravariant conversion
5543         (which is fine in symmetric cases).
5544
5545         (common_type): Prefer long double to double even when
5546         they have the same precision.
5547
5548         * decl.c (grokparms): Call convert_for_initialization to check
5549         default arguments.
5550
5551         * init.c (build_new): void_type_node has a size (of 0).
5552
5553         * decl.c (decls_match): Also check for agreement of TREE_READONLY
5554         and TREE_THIS_VOLATILE.
5555         (push_class_level_binding): Properly handle shadowing of
5556         nested tags by fields.
5557
5558         * search.c (dfs_pushdecls): Ditto.
5559
5560         * decl2.c (finish_file): Don't second-guess self-initialization.
5561
5562         * cvt.c (convert_to_reference): Work with expr directly, rather than
5563         a copy.
5564
5565         * decl.c (push_overloaded_decl): Only shadow artificial TYPE_DECLs.
5566
5567         * init.c (add_friend): Downgrade duplicate friend message from
5568         pedwarn to warning.
5569
5570         * decl.c (duplicate_decls): Push obstacks before calling common_type.
5571
5572 Thu Jan 12 17:15:21 1995  Michael Ben-Gershon  <mybg@cs.huji.ac.il>
5573
5574         * except.c (push_eh_entry): set LABEL_PRESERVE_P flag for
5575         exception table labels.
5576         (expand_start_all_catch): Ditto.
5577         (expand_leftover_cleanups): Ditto.
5578         (expand_end_catch_block): Ditto.
5579         * except.c (make_first_label): new function.
5580         (expand_start_all_catch): add a call to make_first_label() before
5581         using a label as a jump destination.
5582         (expand_end_all_catch): Ditto.
5583         (expand_leftover_cleanups): Ditto.
5584         (expand_end_catch_block): Ditto.
5585         (expand_builtin_throw): Ditto.
5586         (expand_throw): Ditto.
5587         * except.c: Add ARM processor support for exception handling.
5588
5589 Thu Jan 12 12:17:24 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5590
5591         (complete_array_type): Copy code from C frontend.
5592
5593         * lex.c (real_yylex): Don't multiply the length of a wide string
5594         literal by WCHAR_BYTES.
5595
5596         * decl.c (pushdecl): Check for redeclaration of wchar_t here.
5597         (duplicate_decls): Instead of here.
5598         (define_label): Complain about a label named wchar_t.
5599         (grokdeclarator): Complain about declarations of
5600         operator-function-ids as non-functions.
5601
5602         * typeck.c (unary_complex_lvalue): Also wrap prefix -- and ++ in
5603         COMPOUND_EXPRs.
5604         (build_unary_op): Wrap unary plus in a NON_LVALUE_EXPR.
5605
5606         * lex.c (real_yylex): Don't skip whitespace when reading the next
5607         character after ->.
5608
5609 Wed Jan 11 16:32:49 1995  Mike Stump  <mrs@cygnus.com>
5610
5611         * except.c: Allow cc1plus to be built with native compiler on rs6000.
5612         (expand_start_all_catch): Add assemble_external calls for various
5613         routines we call.
5614         (expand_leftover_cleanups): Ditto.
5615         (expand_start_catch_block): Ditto.
5616         (do_unwind): Ditto.
5617         (expand_builtin_throw): Ditto.
5618
5619 Wed Jan 11 01:05:42 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5620
5621         * decl.c (pushtag): Only look for a previous decl in the current
5622         binding level.  Use explicit global scope in DECL_NESTED_TYPENAME.
5623
5624         * gxx.gperf: Add __signature__ and __sigof__ keywords.
5625
5626         * decl2.c (lang_decode_option): -ansi does not set flag_no_asm.  It
5627         does set flag_no_gnu_keywords and flag_operator_names.
5628
5629         * lex.c (init_lex): 'overload' is not a keyword unless -traditional.
5630         Unset extension keywords if -fno-gnu-keywords.
5631         Allow operator names ('bitand') if -foperator-names.
5632         Never unset 'asm'; -fno-asm only affects 'typeof'.
5633
5634         * decl.c (lookup_name_real): The got_object special lookup only
5635         applies to types.
5636
5637 Tue Jan 10 18:07:51 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5638
5639         * spew.c (yylex): Also use DECL_NESTED_TYPENAME if got_object is set.
5640
5641         * parse.y (primary): Unset got_object after all rules that use the
5642         'object' nonterminal.
5643         (object): Set got_object.
5644
5645         * lex.h: Declare got_object.
5646
5647         * decl.c (lookup_name_real): Also lookup names in the context of an
5648         object specified.
5649
5650 Tue Jan 10 14:30:30 1995  Mike Stump  <mrs@cygnus.com>
5651
5652         * typeck.c (get_member_function_from_ptrfunc): Use ptrdiff_type_node
5653         for things that have to be added to pointers, not size_type.  Cures
5654         problems with pointer to members on Alphas.
5655         (build_binary_op_nodefault): Ditto.
5656         (get_delta_difference_: Ditto.
5657         (build_ptrmemfunc): Ditto.
5658
5659 Tue Jan 10 01:49:25 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5660
5661         * decl.c (pushtag): Stick the new decl in TYPE_NAME before pushing
5662         it.
5663
5664         * typeck.c (build_component_ref): Don't build up a COMPONENT_REF
5665         when dealing with overloaded member functions; just act like
5666         build_offset_ref.
5667         (commonparms): Remove misleading comment.
5668
5669         * decl.c (duplicate_decls): Complain about repeated default
5670         arguments here.
5671         (redeclaration_error_message): Instead of here.
5672         (pushdecl): Complain about missing default arguments here.
5673         (grokparms): Instead of here.
5674         (lookup_name_current_level): Also match on DECL_ASSEMBLER_NAME.
5675         (grok_reference_init): Do not complain about missing initializer if
5676         declared 'extern'.
5677
5678         * search.c (lookup_field): Don't return a TYPE_DECL if there is a
5679         function alternative and want_type is not set.
5680
5681 Mon Jan  9 18:16:23 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5682
5683         * decl.c (pushtag): Don't set TYPE_NAME to an identifier.  Do push
5684         the decl when the type has no TYPE_NAME.
5685         (lookup_nested_type): Don't assume that type has TYPE_NAME set.
5686         (lookup_name_real): Call lookup_field with want_type =
5687         prefer_type.
5688
5689         * search.c (lookup_field): Handle want_type properly in the presence
5690         of fields with the same name.
5691
5692         * decl.c (set_nested_typename): Set nested name for file-scope types
5693         to include leading ::.
5694         (pushdecl): Set the nested typename if the decl doesn't have one,
5695         rather than if the type's canonical decl doesn't have one.
5696
5697 Mon Jan  9 03:44:33 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5698
5699         * typeck.c (convert_for_assignment): Complain about contravariance
5700         violation here.
5701         (comp_target_types): Instead of here.
5702         (build_unary_op): resolve_offset_ref before checking for a valid
5703         type.
5704
5705         * spew.c (yylex): Decrement looking_for_typename after we see a
5706         _DEFN.
5707
5708         * decl.c (pushdecl): Don't install an artificial TYPE_DECL in
5709         IDENTIFIER_LOCAL_VALUE if we already have a decl with that name.
5710
5711         * typeck.c (convert_for_assignment): Converting pointers to bool
5712         does not need a cast.
5713
5714 Sun Jan  8 18:16:45 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5715
5716         * class.c (instantiate_type): Initialize nsubsts parm.
5717
5718         * pt.c (do_function_instantiation): Ditto.
5719
5720 Sat Jan  7 14:37:05 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5721
5722         * pt.c (tsubst): Use TREE_STATIC instead of DECL_INLINE &&
5723         DECL_SAVED_INSNS to determine whether or not we've seen a definition
5724         of this function.
5725         (instantiate_template): Ditto.
5726
5727         * call.c (convert_harshness): Allow const reference binding when
5728         called from the overloading code, but not when called from
5729         can_convert (since it isn't a conversion).
5730         (convert_harshness): Put back some disabled code.
5731
5732 Fri Jan  6 14:10:57 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5733
5734         * call.c (convert_harshness): There is no implicit conversion from
5735         void* to other pointer types (unless the parameter is (void*)0).
5736         (convert_harshness): Non-lvalues do not convert to reference types.
5737
5738         * class.c (finish_struct_methods): Still set
5739         TYPE_HAS_{INT,REAL}_CONVERSION.
5740
5741         * call.c (can_convert): Don't use aggregate initialization.
5742
5743         * cp-tree.h: Declare lookup_conversions.
5744
5745 Thu Jan  5 21:08:00 1995  Mike Stump  <mrs@cygnus.com>
5746
5747         * parse.y (simple_stmt): Fix duplicate case value error messages to
5748         be more readable.
5749
5750 Wed Jan  4 16:44:19 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5751
5752         * cvt.c (build_type_conversion): Total rewrite to use
5753         convert_harshness instead of reproducing conversion logic here.  Now
5754         much shorter.
5755
5756         * call.c (convert_harshness): Support conversions to bool.
5757         (can_convert): Checks whether a conversion is less harsh
5758         than USER_CODE, for build_type_conversion.
5759
5760         * search.c (add_conversions): Function for passing to dfs_walk which
5761         adds all the type conversion operators in the current type to a list.
5762         (lookup_conversions): Calls dfs_walk with add_conversions and return
5763         the list.
5764         (dfs_walk): Don't require a qfn.
5765
5766         * cp-tree.h: Lose CLASSTYPE_CONVERSIONS hackery.
5767         (CLASSTYPE_FIRST_CONVERSION): Points to elt 1 of CLASSTYPE_METHOD_VEC.
5768
5769         * class.c (finish_struct_bits): Lose CLASSTYPE_CONVERSIONS hackery.
5770         (grow_method): A separate function for building onto the growing
5771         method vector.
5772         (finish_struct_methods): Use it.  Put all type conversion operators
5773         right after the constructors.  Perhaps we should sort the methods
5774         alphabetically?
5775
5776 Mon Jan  2 14:42:58 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
5777
5778         * call.c (build_method_call): Lose another misleading shortcut.
5779
5780 Fri Dec 30 17:57:30 1994  Mike Stump  <mrs@cygnus.com>
5781
5782         * gc.c (build_bltn_desc): Handle bool as a built-in type.
5783
5784 Fri Dec 30 14:20:21 1994  Mike Stump  <mrs@cygnus.com>
5785
5786         * tree.c (layout_vbasetypes): Ensure that we don't loose alignment
5787         on the complete type because of small virtual bases.
5788
5789 Fri Dec 30 12:22:29 1994  Mike Stump  <mrs@cygnus.com>
5790
5791         * decl.c (n_incomplete): Bump n_incomplete up to int to match C
5792         front end.
5793         (pushdecl): Also count decls pushed that are of a type being defined
5794         as incomplete things.
5795         * class.c (finish_struct): Move hack_incomplete_structures up to
5796         just after we set it as not being defined, so that the decls we
5797         build for RTTI don't count as incomplete.
5798
5799 Thu Dec 29 18:20:57 1994  Mike Stump  <mrs@cygnus.com>
5800
5801         * pt.c (tsubst): Fix problem with defining constructors in templated
5802         classes with virtual bases.
5803
5804 Wed Dec 28 08:31:00 1994  Mike Stump  <mrs@cygnus.com>
5805
5806         * parse.y (TYPEID): Strip top-level cv-qualifiers on typeid
5807         expressions.
5808         * gc.c (build_typeid): Ditto.
5809
5810 Thu Dec 22 17:26:33 1994  Mike Stump  <mrs@cygnus.com>
5811
5812         * cvt.c (build_up_reference): Fix breakage introduced on Nov 29,
5813         don't assert on complex AGGR inits.
5814
5815 Thu Dec 22 14:32:31 1994  Mike Stump  <mrs@cygnus.com>
5816
5817         * method.c (build_overload_value): Handle pointer to members as
5818         template arguments.
5819
5820 Thu Dec 22 13:09:07 1994  Mike Stump  <mrs@cygnus.com>
5821
5822         * typeck.c (unary_complex_lvalue): Don't call sorry if we know how
5823         to do take the address of a data member for a pointer to data
5824         member.
5825
5826 Thu Dec 22 10:04:19 1994  Mike Stump  <mrs@cygnus.com>
5827
5828         * decl.c (grokdeclarator): Use the typedef name for linkage if the
5829         type doesn't otherwise have a name.
5830
5831         * decl2.c (grokfield): Ditto.
5832
5833         * class.c (finish_struct): Since we reuse the TYPE_DECL for the
5834         DECL_NAME of enums, structs and classes, we have to avoid trying to
5835         put it in the TYPE_FIELDS again.
5836
5837 Wed Dec 21 11:07:05 1994  Mike Stump  <mrs@cygnus.com>
5838
5839         * decl2.c (check_classfn): Ignore this parameter on static functions
5840         when checking to see if we match.
5841
5842 Tue Dec 20 17:47:02 1994  Mike Stump  <mrs@cygnus.com>
5843
5844         * typeck.c (unary_complex_lvalue): Handle address of non-left most
5845         pointers to members by calling get_delta_difference.
5846
5847 Mon Dec 19 22:40:53 1994  Mike Stump  <mrs@cygnus.com>
5848
5849         * decl2.c (check_classfn): Don't use decls_match yet, as it modifies
5850         static functions to early.
5851
5852 Thu Dec 19 22:37:48 1994  Mike Stump  <mrs@cygnus.com>
5853
5854         * method.c (make_thunk): Handle encoding of positive thunk offsets.
5855
5856 Sat Dec 17 13:29:50 1994  Doug Evans  <dje@canuck.cygnus.com>
5857
5858         * Make-lang.in (.PHONY): Tell GNU make C++ and c++ are phony targets.
5859
5860 Thu Dec 15 16:32:12 1994  Mike Stump  <mrs@cygnus.com>
5861
5862         * decl2.c (check_classfn): Use decls_match to check if this has
5863         already been declared, as the DECL_ASSEMBLER_NAME may have been
5864         changed via asm("new_name").
5865         * decl.c (decls_match): Make public.
5866
5867 Thu Dec 15 15:17:55 1994  Mike Stump  <mrs@cygnus.com>
5868
5869         * *.[chy] (expand_aggr_init) Add fourth argument to handle
5870         distinction between = init and (init) style of initializations.
5871         * *.[chy] (finish_decl): Add fifth argument to to handle
5872         distinction between = init and (init) style of initializations.
5873
5874 Tue Dec 13 19:16:05 1994  Mike Stump  <mrs@cygnus.com>
5875
5876         Fix some random `explicit' bugs.
5877
5878         * cvt.c (convert_to_reference): Add third parameter to
5879         convert_force.
5880         (convert_force): Ditto.
5881         * call.c (build_method_call): Ditto.
5882         * decl2.c (setup_vtbl_ptr): Ditto.
5883         * init.c (expand_virtual_init): Ditto.
5884         (build_member_call): Ditto.
5885         (build_delete): Ditto.
5886         (build_vbase_delete): Ditto.
5887         * typeck.c (build_component_addr): Ditto.
5888         (build_c_cast): Ditto.
5889         (build_modify_expr): Ditto.
5890         * cp-tree.h (CONV_NONCONVERTING): Ditto. Add so that we can
5891         distinguish the context in which the conversion appears.  Add thrid
5892         argument to build_c_cast.
5893         * cvt.c (cp_convert): Pass whether or not we want to consider
5894         non-converting constructors down to build_method_call.
5895         * decl2.c (reparse_absdcl_as_casts): Add third argument to
5896         build_c_cast.
5897         * gc.c (build_m_desc): Ditto.
5898         * init.c (build_new): Ditto.
5899         * parse.y (expr_no_commas): Ditto.
5900         (primary): Ditto.
5901         * typeck.c (build_x_function_call): Ditto.
5902         (build_static_cast): Ditto.
5903         (build_reinterpret_cast): Ditto.
5904         (build_const_cast): Ditto.
5905         (build_c_cast): Ditto.
5906         (build_ptrmemfunc): Ditto.
5907         * typeck2.c (build_functional_cast): Ditto.
5908         * init.c (expand_aggr_init): Added LOOKUP_ONLYCONVERTING to
5909         expand_aggr_init_1 as inits are converted to the destination type.
5910
5911 Tue Dec 13 16:18:57 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
5912
5913         * Make-lang.in (cc1plus): Depends on c-pragma.o.
5914
5915         * Makefile.in (OBJ{DEP,}S): Add ../c-pragma.o.
5916
5917         * lex.c (check_newline): If the #pragma is not recognized by g++,
5918         try machine-specific ones too.
5919         (handle_sysv_pragma): Copied from c-lex.c.
5920
5921 Mon Dec 12 23:53:06 1994  Mike Stump  <mrs@cygnus.com>
5922
5923         * except.c (expand_throw): Fix Dec 6th change, build_new likes a
5924         reference better.
5925
5926 Mon Dec 12 18:01:00 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
5927
5928         * typeck.c (build_binary_op): Lose checks on TYPE_PTRMEMFUNC_P with
5929         IS_AGGR_TYPE, since now they will not both be set on the same type.
5930
5931         * pt.c (do_pending_expansions): Don't clear TREE_PUBLIC on
5932         instantiations controlled by -fexternal-templates.
5933
5934         * decl.c (duplicate_decls): Don't complain about different values of
5935         __attribute__ ((const)) and ((noreturn)).
5936
5937 Fri Dec  9 18:17:37 1994  Doug Evans  <dje@cygnus.com>
5938
5939         * Makefile.in (BISONFLAGS): Delete --yacc.
5940         (PARSE_H): Depend on $(PARSE_C), for parallel makes.
5941         (PARSE_C): Undo last patch.
5942
5943 Fri Dec  2 10:44:36 1994  Mike Stump  <mrs@cygnus.com>
5944
5945         * Makefile.in (BISONFLAGS): Add --yacc so that output winds up in
5946         y.tab.c.
5947
5948 Thu Dec  8 17:39:46 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
5949
5950         * decl.c (finish_decl): Don't call obscure_complex_init for decls
5951         of indeterminate size.
5952
5953 Wed Dec  7 16:49:22 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
5954
5955         * decl.c (obscure_complex_init): Function to tweak the decl to
5956         prevent expand_decl from tring to initialize it.
5957         (finish_decl): Use it rather than writing the same code in three
5958         different places.
5959
5960         * parse.y (bad_parm): Stop trying to support parms without types.
5961
5962 Wed Dec  7 12:06:56 1994  Mike Stump  <mrs@cygnus.com>
5963
5964         * decl2.c (grokfield): Make asm specs on static member functions
5965         work.
5966
5967 Tue Dec  6 15:43:20 1994  Mike Stump  <mrs@cygnus.com>
5968
5969         * except.c (expand_throw): Make a copy of the thrown object.
5970
5971 Tue Dec  6 14:16:34 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
5972
5973         * parse.y: : has lower precedence than =.
5974
5975 Tue Dec  6 12:46:17 1994  Mike Stump  <mrs@cygnus.com>
5976
5977         * decl.c (pushdecl): Use DECL_NAME of VAR_DECLs to avoid namespace
5978         manglings.
5979         (grokvardecl): Add namespace into variable name.
5980
5981 Tue Dec  6 11:26:55 1994  Mike Stump  <mrs@cygnus.com>
5982
5983         * decl2.c (current_namespace_id): New routine to transform a simple
5984         name into a name in a namespace.
5985         * decl.c (grokdeclarator): Use it.
5986         * decl2.c (get_namespace_id): Find the name of the current
5987         namespace.
5988         (push_namespace, pop_namespace): Complete out missing
5989         functionality.
5990
5991 Mon Dec  5 17:11:51 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
5992
5993         * class.c (finish_struct): Don't use LONG_LONG_TYPE_SIZE, as it may
5994         not be defined.  Fix warning message for enums and restore warning
5995         for non-enums.
5996
5997         * decl2.c (push_namespace): Dummy function.
5998         (pop_namespace): Ditto.
5999         (do_namespace_alias): Ditto.
6000         (do_using_decl): Ditto.
6001         (do_using_directive): Ditto.
6002
6003         * parse.y: New token NSNAME for namespace names.
6004         (extdef): Add namespace, using definitions.
6005         (using_decl): New rule for using declarations.
6006         (any_id): New rule for identifiers with any degree of scoping.
6007         (identifier): Add NSNAME.
6008         (notype_identifier): Ditto.
6009         (component_decl): Add using_decl.
6010         (nested_name_specifier): Add NSNAME SCOPE.
6011
6012         * typeck.c (convert_for_assignment): Handle conversions between
6013         enums and bool.
6014
6015         * decl.c (duplicate_decls): Only propagate DECL_MAIN_VARIANT on
6016         FUNCTION_DECLs.
6017
6018 Mon Dec  5 13:03:16 1994  Mike Stump  <mrs@cygnus.com>
6019
6020         * class.c (finish_struct): Give an error if one tries to declare a
6021         bit-field's size greater than a long long, as the backend will dump.
6022         It is not an error to declare an enum bit-field greater than its
6023         precision.  Warn if an enum bit-field is too small to hold all
6024         its values.
6025
6026 Mon Dec  5 11:41:50 1994  Mike Stump  <mrs@cygnus.com>
6027
6028         * typeck.c (convert_for_assignment): Use cp_convert instead of
6029         convert so that we don't get static casts.
6030
6031 Sun Dec  4 11:59:01 1994  Mike Stump  <mrs@cygnus.com>
6032
6033         * cvt.c (cp_convert): Don't complain about int->enum conversion if
6034         we are doing static casts.
6035
6036 Fri Dec  2 18:32:41 1994  Mike Stump  <mrs@cygnus.com>
6037
6038         * error.c (dump_expr): Do something more intelligent with SAVE_EXPRs
6039         when dumping expressions in error messages.
6040
6041 Fri Dec  2 17:04:27 1994  Mike Stump  <mrs@cygnus.com>
6042
6043         * gc.c (build_dynamic_cast): Change interface to libg++, ensure that
6044         the return type is the right type, and make references work.
6045
6046 Fri Dec  2 16:36:43 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
6047
6048         * decl.c (poplevel): Don't be confused by function-scope
6049         declarations of non-nested functions.
6050         (duplicate_decls): Propagate DECL_MAIN_VARIANT.
6051         (pushdecl): Use duplicate_decls to copy info from old decl into new
6052         function-scope one rather than doing it here.
6053
6054         * decl2.c (mark_inline_for_output): Deal with the DECL_MAIN_VARIANT
6055         of this decl, in case this is a function-scope declaration.
6056
6057         * decl.c (finish_enum): Make sure that the type has the right
6058         precision when we call fixup_*_type.
6059
6060 Tue Nov 29 19:12:07 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
6061
6062         * cvt.c (build_up_reference): Strip superfluous NOP_EXPRs; we do
6063         want to build up references to rvalues if possible.
6064         (cp_convert): Stick on a NOP_EXPR when converting to the same type.
6065
6066 Tue Nov 29 11:28:59 1994  Mike Stump  <mrs@cygnus.com>
6067
6068         * parse.y (maybe_raises): Handle throw ().
6069         * parse.y (ansi_raise_identifier): grok type-ids in exception
6070         specifications.
6071         * tree.c (build_exception_variant): Use list compare to check if
6072         two exception specifications match.
6073         * decl.c (duplicate_decls, bad_specifiers): Enhance wording on error
6074         messages.
6075         * call.c (build_method_call): Remove TREE_RAISES.
6076         * cvt.c (convert_to_aggr): Ditto.
6077         * typeck.c (build_function_call_real, convert_arguments): Ditto.
6078         * init.c (expand_aggr_init_1): Ditto.
6079
6080 Tue Nov 29 09:50:39 1994  Mike Stump  <mrs@cygnus.com>
6081
6082         * except.c: Add support for m68k and mips exception handling
6083         support.
6084
6085 Tue Nov 29 08:48:33 1994  Mike Stump  <mrs@cygnus.com>
6086
6087         * except.c (expand_end_all_catch): Throw into outer context, if we
6088         fall off end of catch handlers.
6089
6090 Mon Nov 28 16:44:41 1994  Mike Stump  <mrs@cygnus.com>
6091
6092         * Makefile.in: Make is easier to decide where parse.[ch] will be
6093         built.
6094
6095 Thu Nov 17 20:11:24 1994  Doug Evans  <dje@cygnus.com>
6096
6097         * cp/Make-lang.in (CXX_INSTALL_NAME) Use program_transform_name.
6098         (GXX_INSTALL_NAME) Likewise.
6099         (CXX_CROSS_NAME) Use program_transform_cross_name.
6100         (GXX_CROSS_NAME) Likewise.
6101         (c++.install-man): Use program_transform_name on g++.1.
6102         (c++.uninstall): Likewise.
6103
6104 Mon Nov 28 13:53:03 1994  Mike Stump  <mrs@cygnus.com>
6105
6106         * parse.y (THROW): Fix precedence of throw expressions.
6107
6108 Mon Nov 28 13:15:16 1994  Mike Stump  <mrs@cygnus.com>
6109
6110         * typeck.c (build_unary_op): Allow promotions from bool to int on
6111         unary ~.
6112
6113 Sun Nov 27 00:16:21 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
6114
6115         * method.c (build_overload_name): Use DECL_ASSEMBLER_NAME for
6116         classes when appropriate.
6117         (build_overload_nested_name): When dealing with a function context,
6118         use ASM_FORMAT_PRIVATE_NAME to tweak the name of the function to
6119         avoid conflicts between local classes of the same name.
6120
6121 Wed Nov 23 17:59:42 1994  Mike Stump  <mrs@cygnus.com>
6122
6123         * gxx.gperf, parse.y, lex.h, hash.h, lex.c (init_lex), delc.c
6124         (duplicate_decls, grokdeclarator), cp-tree.h: Add support for
6125         `explicit'.
6126         * cvt.c (convert_to_reference, cp_convert, build_type_conversion_1,
6127         build_type_conversion): Use LOOKUP_ONLYCONVERTING in
6128         build_method_calls so that non-converting constructors are not used.
6129         * call.c (build_method_call): If we shouldn't use a non-converting
6130         constructor, then don't.
6131
6132 Wed Nov 23 14:46:56 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
6133
6134         * call.c (build_method_call): Don't try to synthesize methods yet.
6135
6136 Tue Nov 22 12:45:21 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
6137
6138         * pt.c (push_template_decls): Create CONST_DECLs for template
6139         constant parameters, not VAR_DECLs.
6140
6141 Sat Nov 19 15:28:31 1994  Jim Wilson  (wilson@chestnut.cygnus.com)
6142
6143         * typeck.c (build_binary_op_nodefault): Can shorten shift only if
6144         shift count is less than size in bits of arg0.
6145
6146 Thu Nov 17 15:30:50 1994  Mike Stump  <mrs@cygnus.com>
6147
6148         * gxx.gperf, hash.h, lex.c (init_lex, real_yylex), parse.y: Add new
6149         ANSI keywords and, and_eq, bitand, bitor, explicit, namespace, not,
6150         not_eq, or, or_eq, typename, using, xor, xor_eq to g++.  Still need
6151         to add support for explicit, namespace, typename, and using, support
6152         for the rest is already in.
6153
6154 Fri Nov  4 19:04:18 1994  Mike Stump  <mrs@cygnus.com>
6155
6156         * gc.c (get_bad_cast_node): New routine to support compile time
6157         throws of bad_cast.
6158         * gc.c (build_dynamic_cast): Support throwing of bad_cast at compile
6159         time.
6160
6161 Fri Nov  4 11:12:00 1994  Mike Stump  <mrs@cygnus.com>
6162
6163         * except.c: Add hppa support.
6164
6165 Fri Nov  4 10:50:50 1994  Mike Stump  <mrs@cygnus.com>
6166
6167         * except.c: Add rs6000 support.
6168
6169 Thu Nov  3 14:24:23 1994  Mike Stump  <mrs@cygnus.com>
6170
6171         * except.c (do_unwind): Add i[34]86 support.
6172
6173 Thu Nov  3 00:10:46 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
6174
6175         * pt.c (do_pending_expansions): Unset TREE_PUBLIC on implicit
6176         instantiations.
6177
6178 Wed Nov  2 15:08:24 1994  Kung Hsu  (kung@mexican.cygnus.com)
6179
6180         * decl.c (finish_function): emit types used in method parameters
6181         into symbol table.
6182
6183 Wed Nov  2 15:05:47 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
6184
6185         * pt.c (process_template_parm): Allow pointer to member function
6186         template parameter types.
6187         (uses_template_parms): Handle pointer to member function
6188         CONSTRUCTORs.
6189
6190         * g++.c (main): Cast first argument of bzero to (char *).
6191         Pass -lstdc++ instead of -lg++ unless we are invoked as 'g++'.
6192
6193 Mon Oct 31 14:50:48 1994  Kung Hsu  (kung@mexican.cygnus.com)
6194
6195         * gc.c (build_dynamic_cast): rewrite to make it work.
6196         * class.c (finish_vtbls): build more vtables if flag_rtti is on.
6197         * class.c (modify_all_direct_vtables): ditto.
6198         * init.c (expand_direct_vtbls_init): expand more vtables if
6199         flag_rtti is on.
6200         * decl.c (init_type_desc): add default return.
6201
6202 Tue Oct 25 17:13:09 1994  Kung Hsu  (kung@mexican.cygnus.com)
6203
6204         * tree.c (debug_binfo): get rid of the initial size entry of
6205         vtable.
6206         * cp-tree.h: change flag_dossier to flag rtti, define type
6207         descriptor type nodes.
6208         * decl.c (init_type_desc): new function to initialize type
6209         descriptor type nodes.
6210         * decl.c (record_builtin_type): change flag_dossier to flag_rtti.
6211         * lex.c (init_lex): ditto.
6212         * decl.c : change variable flag_dossier to flag_rtti.
6213         * decl.c (duplicate_decls): get rid initial size entry of vtable.
6214         * decl.c (hack_incomplete_structures): take out assert 164.
6215         * search.c (get_abstract_virtuals_1): ditto.
6216         * search.c (dfs_init_vbase_pointers): change CLASSTYPE_DOSSIER to
6217         CLASSTYPE_RTTI.
6218         * parse.y: ditto.
6219         * class.c (prepare_fresh_vtable): for virtual bases, get right
6220         offset.
6221         * class.c (add_virtual_function): change flag_dossier to
6222         flag_rtti.
6223         * class.c (modify_one_vtable): modify the right rtti entry.
6224         * class.c (override_one_vtable): get rid of size entry.
6225         * class.c (finish_struct): change flag_dossier to flag_rtti, and
6226         build extra vtables, build type descriptors for polymorphic
6227         classes.
6228         * gc.c (build_headof): make headof() works correctly with new
6229         rtti.
6230         * gc.c (build_typeid): make this function work with new rtti.
6231         * gc.c (get_typeid): make this function work with new rtti.
6232         * gc.c (build_bltn_desc): new function for new rtti.
6233         * gc.c (build_user_desc): ditto.
6234         * gc.c (build_class_desc): ditto.
6235         * gc.c (build_ptr_desc): ditto.
6236         * gc.c (build_attr_desc): ditto.
6237         * gc.c (build_func_desc): ditto.
6238         * gc.c (build_ptmf_desc): ditto.
6239         * gc.c (build_ptmd_desc): ditto.
6240         * gc.c (build_t_desc): ditto.
6241         * gc.c : comment out old build_t_desc, build_i_desc, build_m_desc.
6242
6243 Tue Oct 25 13:37:41 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
6244
6245         * call.c (convert_harshness): Check for TREE_UNSIGNED differences
6246         after checking for integral conversions.
6247
6248 Wed Nov 30 19:13:50 1994  Mike Stump  <mrs@cygnus.com>
6249
6250         * Version 2.6.3 released.
6251
6252 Thu Nov 17 10:56:50 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
6253
6254         * typeck2.c (build_m_component_ref): Check the basetype of the
6255         member pointer against the main variant of the object type.
6256
6257 Mon Nov 14 14:21:52 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
6258
6259         * cvt.c (convert_to_reference): Make sure that the original expr
6260         gets its type back when converting a reference.
6261
6262         * method.c (build_overload_name): Clear numeric_outputed_need_bar here.
6263         (build_decl_overload): Instead of here.
6264
6265 Tue Nov  8 17:11:24 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
6266
6267         * cvt.c (cp_convert): Don't build a TARGET_EXPR if we're not in a
6268         function.
6269
6270         * typeck.c (convert_for_initialization): Handle initialization from
6271         a TARGET_EXPR.
6272
6273 Sun Nov  6 01:34:24 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
6274
6275         * pt.c (lookup_nested_type_by_name): Fix list-walking logic.
6276         (tsubst): When replacing a TEMPLATE_TYPE_PARM, propagate
6277         TYPE_READONLY and TYPE_VOLATILE from the argument.
6278         (unify): When unifying with a TEMPLATE_TYPE_PARM, remove cv-quals
6279         present in parm from arg.
6280         (type_unification): Strip REFERENCE_TYPE from the argument type.
6281         (unify): Don't strip REFERENCE_TYPE from the argument type.
6282
6283 Sat Nov  5 22:42:15 1994  Greg McGary  (gkm@magilla.cichlid.com)
6284
6285         * pt.c (do_type_instantiation): Check to see if there's a
6286         IDENTIFIER_TEMPLATE on a class before calling
6287         instantiate_member_templates().
6288
6289 Sat Nov 12 06:35:42 1994  Mike Stump  <mrs@cygnus.com>
6290
6291         * Version 2.6.2 released.
6292
6293 Thu Nov  3 18:48:19 1994  Paul Eggert  <eggert@twinsun.com>
6294
6295         * Makefile.in (spew.o, lex.o, pt.o):
6296         Depend on $(srcdir)/parse.h, not parse.h.
6297
6298 Tue Nov  1 19:19:41 1994  Mike Stump  <mrs@cygnus.com>
6299
6300         * Version 2.6.1 released.
6301
6302 Sun Oct 23 13:19:55 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
6303
6304         * decl2.c: Declare flag_access_control.
6305         (struct lang_f_options): Add access-control.
6306         * expr.c (cplus_expand_expr, NEW_EXPR): Unset flag_access_control
6307         for the call to expand_aggr_init to copy the object out of the
6308         pcc_struct_return slot.
6309         * search.c (compute_access): if (!flag_access_control) return
6310         access_public.
6311
6312 Fri Oct 21 00:32:54 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
6313
6314         * lex.c (cons_up_default_function): Don't try to defer method
6315         synthesis now.
6316
6317         * decl.c (init_decl_processing): Use __pure_virtual for abort_fndecl
6318         instead of abort, since the OSF/1 dynamic linker doesn't like to see
6319         relocation entries for abort.
6320
6321         * tree.c (array_type_nelts_total): Use sizetype, not
6322         integer_type_node.
6323         (array_type_nelts_top): Ditto.
6324
6325 Thu Oct 20 15:48:27 1994  Mike Stump  <mrs@cygnus.com>
6326
6327         * decl.c (grokdeclarator): Added handling for catch parameters
6328         (CATCHPARM).
6329         * except.c (expand_start_catch_block): Use the new CATCHPARM context
6330         instead of NORMAL.
6331         * except.c (expand_throw): Don't let convert_to_reference complain
6332         about what we are doing.
6333
6334 Thu Oct 20 12:55:24 1994  Jim Wilson  (wilson@cygnus.com)
6335
6336         * method.c (emit_thunk): Call instantiate_virtual_regs.
6337
6338 Wed Oct 19 14:15:33 1994  Mike Stump  <mrs@cygnus.com>
6339
6340         * except.c (expand_exception_blocks): Make sure throw code doesn't
6341         get put in function that won't be output.
6342
6343 Mon Oct 17 18:03:15 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
6344
6345         * decl.c (init_decl_processing): Make alloca a builtin.
6346
6347 Thu Oct 27 21:10:25 1994  Craig Burley  (craig@burley)
6348
6349         * g++.c (main): Only decrement "added" and set "library" to
6350         NULL when "library" != NULL (just like 940829 fix).
6351
6352 Mon Oct 17 15:56:11 1994  Mike Stump  <mrs@cygnus.com>
6353
6354         * except.c (expand_start_catch_block): Make sure the false label
6355         gets onto the permanent obstack, as it is used for the exception
6356         table.
6357
6358 Fri Oct 14 18:54:48 1994  Mike Stump  <mrs@cygnus.com>
6359
6360         * class.c (modify_one_vtable): Since the DECL_CONTEXT of fndecl can
6361         be set just below, use current_fndecl instead.
6362
6363 Fri Oct 14 15:12:22 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
6364
6365         * init.c (expand_aggr_vbase_init_1): Don't call expand_aggr_init_1
6366         with LOOKUP_SPECULATIVELY.
6367         (expand_default_init): Abort if build_method_call returns NULL_TREE.
6368
6369         * typeck.c (build_modify_expr): Don't just build a MODIFY_EXPR if
6370         the rhs is a TARGET_EXPR.
6371
6372         * parse.y (left_curly): Anonymous types are not affected by #pragma
6373         interface/implementation.
6374
6375         * method.c (synthesize_method): Don't call setup_vtbl_ptr for the
6376         default constructor if it isn't needed.
6377
6378         * lex.c (cons_up_default_function): Do synthesize methods for
6379         anonymous types if necessary.
6380
6381 Thu Oct 13 17:44:55 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
6382
6383         * method.c (build_decl_overload): Set numeric_outputed_need_bar to 0.
6384
6385 Wed Oct 12 13:27:57 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
6386
6387         * typeck.c (build_modify_expr): Understand how to copy an aggregate.
6388
6389         * init.c (expand_default_init): Ditto.  Also remove some of the
6390         crufty code that assumes methods will not be synthesized properly.
6391
6392         * lex.c (cons_up_default_function): If the containing type has no
6393         name, these functions should never need to be called, so just
6394         declare them.
6395
6396         * lex.c (real_yylex): Use HOST_BITS_PER_WIDE_INT to determine the
6397         bitmask for lexing character constants.
6398
6399         * call.c (build_method_call): Disable code that tries to do tricky
6400         stuff with a default parameter that is a constructor call, but
6401         actually does other tricky stuff that breaks things.
6402
6403 Wed Oct 12 16:14:01 1994  Benoit Belley  <belley@cae.ca>
6404
6405         * decl.c (finish_enum): Disable code which forces enums to be signed,
6406         since this conflicts with their use as bitfields. type_promotes_to
6407         handles promotion of enums of underlying unsigned types to signed
6408         integer types.
6409
6410 Wed Oct 12 13:24:03 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
6411
6412         * cvt.c (type_promotes_to): Also promote enums to long if
6413         appropriate.
6414
6415         * typeck.c (default_conversion): Don't expect type_promotes_to to
6416         return a main variant.
6417
6418 Wed Oct 12 12:19:45 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
6419
6420         * call.c (build_scoped_method_call): Don't lose side effects in the
6421         object expression when calling a non-existent destructor.
6422
6423 Fri Sep  2 19:05:21 1994  Rohan Lenard  (rjl@iassf.easams.com.au)
6424
6425         * call.c (build_scoped_method_call): Remove erroneous error message
6426         when destructor call is written as a scoped call.
6427
6428 Tue Oct 11 23:48:31 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
6429
6430         * various: Cast pointer arguments to bzero and bcopy to char *.
6431
6432 Tue Oct 11 19:34:32 1994  Mike Stump  <mrs@cygnus.com>
6433
6434         * class.c (get_derived_offset): Added a type parameter to limit how
6435         far up the CLASSTYPE_VFIELD_PARENT chain we search.
6436         * class.c (modify_one_vtable, fixup_vtable_deltas): When forming the
6437         offset to put into the vtable for the this parameter, make sure we
6438         don't offset from a parent of the DECL_CONTEXT of the function.
6439
6440 Tue Oct 11 16:10:52 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
6441
6442         * pt.c (do_function_instantiation): Set DECL_EXTERNAL and
6443         TREE_STATIC when setting DECL_INTERFACE_KNOWN.
6444         (do_type_instantiation): Ditto.
6445
6446         * lex.c (cons_up_default_function): Set DECL_INTERFACE_KNOWN,
6447         DECL_EXTERNAL and TREE_STATIC as appropriate.
6448
6449         * decl2.c (finish_file): Also synthesize methods that don't have
6450         DECL_EXTERNAL set.  Set interface_unknown before doing so.
6451
6452         * decl.c (start_function): If DECL_INTERFACE_KNOWN is set on the
6453         function decl, don't muck with TREE_PUBLIC and DECL_EXTERNAL.
6454
6455 Mon Oct 10 00:56:53 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
6456
6457         * lex.c (cons_up_default_function): Mark methods in a template class
6458         as template instances.  Store the values of interface_unknown and
6459         interface_only for do_pending_inlines.
6460         (do_pending_inlines): Use them.
6461
6462         * decl2.c (finish_file): If we haven't seen a definition of a
6463         function declared static, make the decl non-PUBLIC so compile_file
6464         can give an error.
6465
6466 Sun Oct  9 02:42:29 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
6467
6468         * method.c (do_build_copy_constructor): Handle anonymous unions.
6469         (do_build_assign_ref): Ditto.
6470         (largest_union_member): Move from lex.c.
6471
6472 Sat Oct  8 14:59:43 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
6473
6474         Re-implement g++'s vague linkage independent of TREE_PUBLIC.
6475         * pt.c (instantiate_member_templates): Lose redundant
6476         -fexternal-templates handling.
6477         (tsubst): Set TREE_PUBLIC and DECL_EXTERNAL on new decls.  Don't set
6478         TREE_STATIC or DECL_INTERFACE_KNOWN.
6479         (do_pending_expansions): Predicate on DECL_INTERFACE_KNOWN instead
6480         of DECL_EXTERNAL for explicit instantiations.
6481         (do_function_instantiation): Do the new thing.
6482         (do_type_instantiation): Ditto.
6483         (instantiate_template): Deal with member templates defined in a .cc
6484         file with -fexternal-templates.
6485         * except.c (expand_exception_blocks): Use DECL_LINKAGE_KNOWN to
6486         decide whether to stick builtin_throw here.
6487         * decl2.c (import_export_inline): Predicate on DECL_INTERFACE_KNOWN
6488         rather than TREE_PUBLIC.  Generally fix rules.
6489         (finish_file): Use DECL_INITIAL to determine whether or not a method
6490         has been synthesized, rather than TREE_ASM_WRITTEN.
6491         * decl.c (warn_extern_redeclared_static): Use DECL_PUBLIC instead of
6492         TREE_PUBLIC.
6493         (pushdecl): Ditto.
6494         (duplicate_decls): Ditto.  Deal with DECL_DECLARED_STATIC and
6495         DECL_INTERFACE_KNOWN. 
6496         (redeclaration_error_message): Fix checking for conflicting linkage.
6497         (define_function): Set DECL_INTERFACE_KNOWN.
6498         (grokfndecl): Function decls are PUBLIC until we are sure about
6499         their linkage.  Set DECL_DECLARED_STATIC as needed.
6500         (start_function): Deal with linkage.  Move pushdecl after linkage
6501         magic.
6502         (finish_function): Don't set TREE_ASM_WRITTEN on discarded inlines.
6503         * cp-tree.h (lang_decl_flags): Add interface_known and
6504         declared_static.
6505         (DECL_INTERFACE_KNOWN): New macro.
6506         (DECL_DECLARED_STATIC): New macro.
6507         (DECL_PUBLIC): New macro.
6508
6509         Clean up bogus use of TREE_PUBLIC.
6510         * class.c (alter_access): Fix mistaken use of TREE_PUBLIC (it
6511         doesn't correspond to TREE_PROTECTED and TREE_PRIVATE).
6512         * init.c (do_friend): Don't arbitrarily set TREE_PUBLIC.
6513
6514 Wed Oct  5 13:44:41 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
6515
6516         * call.c (build_overload_call_real): Don't immediately do
6517         array->pointer conversion.
6518
6519         * pt.c (type_unification): If not passing to a reference, strip
6520         cv-quals.  Also handle array->pointer conversion.
6521
6522 Tue Oct  4 17:45:37 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
6523
6524         * decl.c (grokdeclarator): Don't warn about applying const to a
6525         const typedef or template type parameter.
6526
6527         * decl2.c (finish_file): Also synthesize methods after walking the
6528         vtables.  Ugly ugly ugly.
6529
6530 Mon Oct  3 15:02:41 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
6531
6532         * various: Remove lingering remnants of old exception handling code.
6533
6534         * decl2.c (finish_file): Synthesize methods before walking the
6535         vtables, so that the vtables get emitted as needed.
6536
6537         * decl.c (shadow_tag): Remove obsolete code for pushing tags and
6538         dealing with exceptions.
6539
6540 Mon Oct  3 13:05:27 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
6541
6542         * Make-lang.in (g++-cross): Depend upon version.o and $(LIBDEPS).
6543
6544 Mon Oct  3 02:59:28 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
6545
6546         * decl2.c (finish_file): Fix inline handling.
6547
6548 Sun Oct  2 00:21:56 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
6549
6550         * decl.c (grokdeclarator): Handle redundant scope even better.
6551         ({push,pop}_cp_function_context): Take toplev parameter.
6552
6553         * method.c (synthesize_method): Pass toplev parameter to
6554         {push,pop}_cp_function_context depending on decl_function_context
6555         (fndecl).
6556
6557         * typeck.c (build_x_unary_op): Unary & on OFFSET_REFs is always the
6558         built-in version.
6559
6560         * method.c (synthesize_method): Don't be confused by __in_chrg
6561         parameter.
6562
6563         * class.c (popclass): Set C_C_D like start_function does.
6564
6565         * decl.c (grokdeclarator): Handle redundant scope better.
6566
6567         * parse.y (expr_or_declarator): Add '(' expr_or_declarator ')' rule.
6568         (direct_notype_declarator): Ditto.
6569         (complex_direct_notype_declarator): Remove it here.
6570
6571 Sat Oct  1 21:42:18 1994  Jason Merrill  (jason@deneb.cygnus.com)
6572
6573         * init.c (resolve_offset_ref): Fix types used in resolving .*
6574         expressions.
6575
6576 Sat Oct  1 15:18:49 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
6577
6578         Beginnings of work to synthesize methods only when needed.
6579         * call.c (build_method_call): Synthesize methods as necessary
6580         (currently never necessary).
6581         * class.c (popclass): Don't try to set C_C_D here, as it'll end up
6582         on the wrong obstack.
6583         * decl.c (push_cp_function_context): Mostly copied from
6584         push_c_function_context.
6585         (pop_cp_function_context): Similarly.
6586         (finish_function): Reverse order of poplevel and pop_nested_class so
6587         that current_class_decl is restored properly.  
6588         (start_function): Ditto.
6589         (finish_function): Add parameter 'nested'.  Don't call
6590         permanent_allocation if (nested).
6591         * various: Pass extra parameter to finish_function.     
6592         * decl2.c (finish_file): Reorganize end-of-file inline handling,
6593         synthesizing methods as necessary.
6594         * lex.c (cons_up_default_function): Call mark_inline_for_output.
6595         Only synthesize methods immediately if #pragma implementation
6596         (currently disabled).
6597         (do_pending_inlines): Call synthesize_method.
6598         * method.c (synthesize_method): New function; all method synthesis
6599         goes through here.  Calls do_build_assign_ref and
6600         do_build_copy_constructor.
6601         (build_default_constructor): Remove.
6602         (build_dtor): Ditto.
6603         (build_assign_ref): Rename to do_build_assign_ref and remove stuff
6604         done by synthesize_method.
6605         (build_copy_constructor): Similarly.
6606
6607 Thu Sep 29 16:58:52 1994  Mike Stump  <mrs@cygnus.com>
6608
6609         * typeck.c (c_expand_return): Use magic so the backend can fixup the
6610         assignment into the return register, so cleanups won't clobber it.
6611
6612 Thu Sep 29 13:08:50 1994  Jason Merrill  (jason@deneb.cygnus.com)
6613
6614         * method.c (hack_identifier): Don't call assemble_external for
6615         template decls.
6616
6617         * decl.c (finish_decl): Also end temporary allocation if the decl in
6618         question has a type of error_mark_node.
6619
6620 Wed Sep 28 21:45:00 1994  Mike Stump  <mrs@cygnus.com>
6621
6622         * typeck.c (build_modify_expr): When optimizing ?: on lhs, make sure
6623         that if the ?: was a reference type, that the subparts will be also.
6624
6625 Wed Sep 28 16:14:04 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
6626
6627         * except.c (register_exception_table): Use Pmode, not PTRmode.
6628
6629 Fri Sep 23 13:54:27 1994  Jason Merrill  (jason@deneb.cygnus.com)
6630
6631         * lex.c (do_pending_inlines): Do method synthesis after the
6632         pending_inlines have been reversed.
6633
6634 Thu Sep 22 12:53:03 1994  Per Bothner  (bothner@kalessin.cygnus.com)
6635
6636         * decl2.c (finish_file):  Fix Brendan's fix:  Only call
6637         register_exception_table if there is a non-empty exception table.
6638
6639 Thu Sep 22 12:03:46 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
6640
6641         * decl2.c (finish_file): Only do register_exception_table if
6642         -fhandle-exceptions is being used.
6643
6644 Wed Sep 21 19:01:51 1994  Per Bothner  (bothner@kalessin.cygnus.com)
6645
6646         * except.c (output_exception_table_entry):  Simplify
6647         by using assemble_integer.
6648         (build_exception_table):  Change to return a count.
6649         Cleanup to use standard macros, instead of hard-wired
6650         sparc asm format.  Don't make __EXCEPTION_TABLE__ global.
6651         (register_exception_table):  New function.  Generate call to builtin.
6652         * decl2.c (finish_file):  Call register_exception_table.
6653         * cp-tree.h (build_exception_table):  Fix prototype.
6654
6655 Wed Sep 21 13:20:42 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
6656
6657         * tree.c (break_out_calls): Don't try to duplicate the DECL_INITIAL.
6658
6659         * decl2.c (delete_sanity): Give an error at trying to delete a
6660         function.
6661
6662 Wed Sep 21 11:47:10 1994  Jason Merrill  (jason@deneb.cygnus.com)
6663
6664         * lex.c (cons_up_default_function): Mark synthesized destructors
6665         inline.
6666
6667         * decl.c (duplicate_decls): Ignore redeclarations of wchar_t as
6668         something other than __wchar_t, complaining if -pedantic and not in
6669         a system header.
6670
6671 Tue Sep 20 09:43:28 1994  Jason Merrill  (jason@deneb.cygnus.com)
6672
6673         * decl.c (xref_tag): Set up BINFO_INHERITANCE_CHAIN on base binfos
6674         here.
6675
6676         * typeck.c (build_modify_expr): Require complete type after checking
6677         for error_mark_node.
6678
6679         * call.c (build_method_call): Print parmtypes when complaining of
6680         ambiguous call.
6681
6682         * typeck.c (build_modify_expr): Handle assignment to array from
6683         non-array.
6684
6685         * decl.c (lookup_name_real): Deal with got_scope == error_mark_node.
6686
6687         * call.c (build_method_call): Don't bother with the exact match.
6688
6689 Mon Sep 19 00:51:39 1994  Jason Merrill  (jason@deneb.cygnus.com)
6690
6691         * init.c (expand_aggr_init): If we munge the type of the variable,
6692         also munge the type of the initializer.
6693
6694         * decl.c (grokdeclarator): Use <= when comparing to RID_LAST_MODIFIER.
6695         (init_decl_processing): Push artificial declaration of wchar_t so
6696         people don't have to declare it before they can use it.
6697
6698         * error.c (cp_line_of): return lineno in lieu of 0.
6699
6700         * typeck.c (convert_for_assignment): Handle conversion of pmfs to
6701         int and bool.
6702         (build_component_ref): Fold the COMPONENT_REF in case it can be
6703         reduced.
6704
6705         * typeck2.c (store_init_value): Don't pedwarn about non-constant
6706         bracketed initializers for automatic variables.
6707
6708 Sun Sep 18 10:12:12 1994  Jason Merrill  (jason@deneb.cygnus.com)
6709
6710         * error.c (dump_decl): Don't say `typedef enum foo foo'.
6711
6712         * decl.c (start_decl): Don't set TREE_PUBLIC on template decls just
6713         because they're affected by #pragma i/i.  We'll deal with that when
6714         they get instantiated.
6715
6716         * typeck.c (build_unary_op): Clean up cruft in ADDR_EXPR case.
6717
6718         * class.c (instantiate_type): Set TREE_CONSTANT on instantiated
6719         ADDR_EXPRs if appropriate.
6720
6721         * decl.c (build_ptrmemfunc_type): Unset IS_AGGR_TYPE on pmf types.
6722
6723         * typeck.c (build_ptrmemfunc): Handle &overloaded_method as an
6724         initializer properly.
6725         * typeck2.c (digest_init): Ditto.
6726
6727         * tree.c (cp_build_type_variant): Like c_build_type_variant, except
6728         it uses build_cplus_array_type.
6729         * *.c: Use cp_build_type_variant instead of c_build_type_variant.
6730
6731         * pt.c (do_type_instantiation): Don't try to instantiate nested
6732         enums.
6733
6734 Tue Sep 13 10:56:58 1994  Jason Merrill  (jason@deneb.cygnus.com)
6735
6736         * cvt.c (build_up_reference): Handle preincrement and predecrement
6737         properly.
6738
6739 Tue Sep 13 09:51:59 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
6740
6741         * decl.c (finish_decl): Only lay out the rtl for DECL if it is, in
6742         fact, static.
6743
6744 Mon Sep 12 14:40:30 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
6745
6746         * decl.c (finish_decl): Lay out the rtl for DECL before doing
6747         grok_reference_init, in case it's static.
6748
6749 Mon Sep 12 12:45:38 1994  Jason Merrill  (jason@deneb.cygnus.com)
6750
6751         * class.c (finish_struct): Don't synthesize constructors if the
6752         class has a field with the same name as the class.  Don't die on
6753         classes with no constructors or destructors.  Don't die if the head
6754         and tail of the class are in different files.
6755
6756         * decl.c (grokdeclarator): Don't treat a function pointer field
6757         with the same name as the class as a constructor.
6758
6759 Fri Sep  9 13:17:00 1994  Jason Merrill  (jason@deneb.cygnus.com)
6760
6761         * typeck.c (build_c_cast): Pull constant values out of their
6762         variables here.
6763
6764         * decl.c (duplicate_decls): Only propagate DECL_CHAIN in
6765         FUNCTION_DECLs and TEMPLATE_DECLs.
6766
6767 Thu Sep  8 10:07:48 1994  Jason Merrill  (jason@deneb.cygnus.com)
6768
6769         * decl.c (duplicate_decls): Propagate DECL_CHAIN in all DECLs that
6770         have it.
6771
6772         * pt.c (unify): REALs and INTEGERs only unify with their own genus.
6773         (instantiate_member_templates): Don't muck with DECL_EXTERNAL and
6774         TREE_PUBLIC unless -fexternal-templates.
6775
6776 Wed Sep  7 13:17:10 1994  Jason Merrill  (jason@deneb.cygnus.com)
6777
6778         * pt.c (do_type_instantiation): Call instantiate_member_templates.
6779         Deal with specializations.
6780         (tsubst): Don't stick the mangled name in DECL_NAME for function
6781         instantiations.  Don't push them, either.
6782
6783         * decl2.c (grokfield): Move code for generating the
6784         DECL_ASSEMBLER_NAME for static members from here.
6785         * method.c (build_static_name): To here.
6786         * decl.c (grokvardecl): Call build_static_name.
6787         (duplicate_decls): Keep old DECL_ASSEMBLER_NAME.
6788
6789 Mon Sep  5 12:49:18 1994  Jason Merrill  (jason@deneb.cygnus.com)
6790
6791         * call.c (build_method_call): if -Wsynth, warn when selecting
6792         synthesized op= over user-supplied one cfront would select.
6793         * decl2.c (lang_decode_option): Handle -Wsynth.
6794
6795 Fri Sep  2 15:11:59 1994  Jason Merrill  (jason@deneb.cygnus.com)
6796
6797         * decl.c (finish_enum): Overhaul to fix several bugs.
6798         (start_enum): Disable useless code.
6799
6800 Thu Sep  1 16:04:54 1994  Jason Merrill  (jason@deneb.cygnus.com)
6801
6802         * typeck.c (c_expand_return): Warn about returning a reference to a
6803         temporary.
6804         (convert_arguments): Increment argument counter when using default
6805         arguments, too.
6806
6807 Wed Aug 31 14:29:22 1994  Jason Merrill  (jason@deneb.cygnus.com)
6808
6809         * decl.c (finish_decl): If the type of decl is error_mark_node,
6810         don't bother trying to do anything.
6811
6812         * typeck.c (convert_for_initialization): If the rhs contains a
6813         constructor call, pretend the lhs type needs to be constructed.
6814
6815         * init.c (expand_default_init): If we stick the object inside the
6816         initializer, mark the initializer used.
6817
6818 Tue Aug 30 13:50:18 1994  Jason Merrill  (jason@deneb.cygnus.com)
6819
6820         * method.c (build_assign_ref): return *this;
6821         (build_assign_ref): Fix base assignment order.
6822         (build_copy_constructor): Fix member init order.
6823
6824 Mon Aug 29 13:54:39 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
6825
6826         * g++.c (main): Remember to clear out SAW_SPECLANG after we see
6827         its argument.
6828
6829 Sat Aug 27 09:36:03 1994  Jason Merrill  (jason@deneb.cygnus.com)
6830
6831         * method.c (build_copy_constructor): Also copy virtual bases.
6832
6833 Fri Aug 26 17:05:15 1994  Jason Merrill  (jason@deneb.cygnus.com)
6834
6835         * lex.c (do_pending_inlines): Clear out pending_inlines before doing
6836         any synthesis.  Also first set deja_vu on all pending_inlines.
6837
6838         * method.c (build_assign_ref): Use build_member_call to invoke base
6839         operator=, rather than build_modify_expr.  And use
6840         build_reference_type instead of TYPE_REFERENCE_TO.
6841         (build_copy_constructor): Use TYPE_NESTED_NAME to identify the
6842         basetype.
6843
6844         * decl2.c (grokfield): Don't complain about undefined local class
6845         methods.
6846
6847         * class.c (finish_struct): Don't try to synthesize methods here.
6848         * lex.c (do_pending_inlines): Instead, synthesize them here.
6849         (init_lex): Initialize synth_obstack.
6850         (cons_up_default_function): Stick synthesis request on
6851         pending_inlines.
6852
6853 Fri Aug 26 12:24:14 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
6854
6855         * call.c (build_method_call) [PCC_STATIC_STRUCT_RETURN]: Also
6856         accept an RTL_EXPR in what we're about to use for the instance,
6857         since anything which would end up with pcc_struct_return set
6858         inside cplus_expand_expr.
6859
6860         * cp-tree.h (cons_up_default_function): Note change of prototype.
6861
6862 Thu Aug 25 23:05:30 1994  Gerald Baumgartner  (gb@cs.purdue.edu)
6863
6864         * class.c (finish_struct): Undid change from Aug 21 testing
6865         CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING.
6866         * parse.y (left_curly): Ditto, undid change from Aug 21.
6867         * decl.c (xref_tag): Undid change from Aug 21, set
6868         CLASSTYPE_INTERFACE correctly, and added comments.
6869
6870 Thu Aug 25 00:36:31 1994  Jason Merrill  (jason@deneb.cygnus.com)
6871
6872         Rework approach to synthesized methods; don't go through the parser
6873         anymore.
6874         * class.c (finish_struct): Use new synthesis approach.
6875         * lex.c (cons_up_default_function): Now just creates declaration,
6876         not code.
6877         (largest_union_member): #if 0 out.
6878         (default_assign_ref_body): Ditto.
6879         (default_copy_constructor_body): Ditto.
6880         * method.c (build_default_constructor): New function to synthesize X().
6881         (build_copy_constructor): Synthesize X(X&).
6882         (build_assign_ref): Synthesize X::operator=(X&).
6883         (build_dtor): Synthesize ~X().
6884
6885         * error.c (cp_line_of): If we're dealing with an artificial
6886         TYPE_DECL, look at the type instead.
6887
6888 Wed Aug 24 11:11:50 1994  Jason Merrill  (jason@deneb.cygnus.com)
6889
6890         * init.c (sort_member_init): Check warn_reorder.
6891         * decl2.c (lang_decode_option): Handle -W{no-,}reorder.
6892
6893         * cp-tree.h (CLASSTYPE_SOURCE_LINE): New macro.
6894         * error.c (cp_line_of): Use CLASSTYPE_SOURCE_LINE for aggregates.
6895         * class.c (finish_struct): Set CLASSTYPE_SOURCE_LINE.
6896
6897 Tue Aug 23 09:28:35 1994  Mike Stump  <mrs@cygnus.com>
6898
6899         * error.c (dump_decl): Improve wording, so that error messages
6900         dont't read template<, class foo>...
6901
6902 Mon Aug 22 15:30:51 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
6903
6904         * parse.y (label_colon): Also match a TYPENAME as a label name,
6905         since they may have declared a class by that name but have also
6906         tried to have a local label under the same name.
6907
6908         * pt.c (coerce_template_parms): Call cp_error, not cp_error_at,
6909         for the message so they know at what point it was instantiated.
6910
6911 Sun Aug 21 23:07:35 1994  Gerald Baumgartner  (gb@cs.purdue.edu)
6912
6913         * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and
6914         CLASSTYPE_VTABLE_NEEDS_WRITING for signatures up to left_curly time.
6915         * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and
6916         CLASSTYPE_VTABLE_NEEDS_WRITING for signatures down to left_curly time.
6917         * parse.y (left_curly): New final resting place for setting
6918         CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING for signatures.
6919
6920         * class.c (finish_struct): Don't test for function/field name
6921         conflicts in signatures, since all the fields are compiler-constructed.
6922
6923 Fri Aug 19 14:04:47 1994  Kung Hsu  (kung@mexican.cygnus.com)
6924
6925         * method.c (build_overload_nested_name): in qualified name
6926         mangling, the template with value instantiation will have numeric
6927         at end and may mixed with the name length of next nested level.
6928         Add a '_' in between.
6929         * method.c (build_overload_name): ditto.
6930         * method.c (build_overload_identifier): ditto.
6931
6932 Thu Aug 18 16:24:43 1994  Mike Stump  <mrs@cygnus.com>
6933
6934         * error.c (dump_decl): Handle NULL args.
6935
6936 Thu Sep 29 16:15:36 1994  Michael I Bushnell  <mib@churchy.gnu.ai.mit.edu>
6937
6938         * g++.c: Rework last change so it's done like collect.c (and 
6939         gcc.c).
6940
6941 Wed Sep 14 10:17:27 1994  Michael I Bushnell  <mib@churchy.gnu.ai.mit.edu>
6942
6943         * g++.c: Include <sys/errno.h> in case `errno' is a macro
6944         as permitted by ANSI C.
6945
6946 Thu Aug 18 12:48:09 1994  Mike Stump  <mrs@cygnus.com>
6947
6948         * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and
6949         CLASSTYPE_VTABLE_NEEDS_WRITING up to left_curly time.
6950         * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and
6951         CLASSTYPE_VTABLE_NEEDS_WRITING down to left_curly time.
6952         * parse.y (left_curly): New final resting place for setting
6953         CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING.
6954
6955 Thu Aug 11 11:32:42 1994  H.J. Lu  (hjl@nynexst.com)
6956
6957         * g++.c (main): Only decrement "added" and set "library" to
6958           NULL when "library" != NULL.
6959
6960 Sat Aug 13 00:14:52 1994  Jason Merrill  (jason@deneb.cygnus.com)
6961
6962         * decl.c (grokdeclarator): Don't set TREE_PUBLIC on a function decl
6963         just because its class has a known interface.
6964         (decls_match): Deal with new format of template parms.
6965
6966         * lex.c (cons_up_default_function): Don't play with TREE_PUBLIC and
6967         DECL_EXTERNAL here.
6968
6969 Fri Aug 12 01:55:15 1994  Jason Merrill  (jason@deneb.cygnus.com)
6970
6971         * decl.c (pushtag): SET_DECL_ARTIFICIAL on gratuitous typedefs.
6972         (xref_defn_tag): Ditto.
6973         (pushdecl): Only allow artificial typedefs to be shadowed.
6974
6975         * init.c (emit_base_init): Pass the right binfos to
6976         expand_aggr_init_1.
6977
6978         * class.c (delete_duplicate_fields_1): Make it work right.
6979         (finish_struct): Catch function/field name conflict.
6980
6981         * decl2.c (check_classfn): Pass the function to cp_error, not just
6982         the name.
6983
6984         * init.c (sort_member_init): Warn when order of member initializers
6985         does not match order of member declarations.
6986         (emit_base_init): Call expand_aggr_init_1 with LOOKUP_PROTECT.
6987
6988         * error.c (dump_expr): Handle lists of functions.
6989
6990         * decl.c (start_function): #pragma interface only affects functions
6991         that would otherwise be static.
6992         (finish_decl): Don't warn about an unused variable if it has both
6993         constructor and destructor, since the 'resource allocation is
6994         initialization' idiom is relatively common.
6995
6996         * typeck.c (comp_target_types): Don't handle TEMPLATE_TYPE_PARMs.
6997         (comp_target_parms): Ditto.
6998         (compparms): Never consider default parms.
6999         (common_base_type): Don't choose a virtual baseclass if there is a
7000         more derived class in common.
7001         (build_conditional_expr): If pedantic, pedwarn about conversion to
7002         common base in conditional expr.
7003
7004         * class.c (instantiate_type): Handle template instantiation better.
7005
7006         * typeck.c (convert_arguments): Don't try to get tricky and convert
7007         to int directly when PROMOTE_PROTOTYPES is set, as it breaks
7008         user-defined conversions.
7009
7010         * lex.c (check_for_missing_semicolon): Also give error at end of
7011         file.
7012
7013         * call.c (build_method_call): Don't promote arrays to pointers here.
7014
7015         * typeck.c (convert_arguments): Don't require the actual parameter
7016         to be of a complete type if the formal parameter is a reference.
7017
7018 Thu Aug 11 15:21:40 1994  Jason Merrill  (jason@deneb.cygnus.com)
7019
7020         * decl.c (grokdeclarator): Soften 'static' on member function error
7021         to pedwarn.
7022
7023         * init.c (build_new): Don't automatically save rval.
7024         (build_offset_ref): Do field lookup with proper basetype_path.
7025
7026 Thu Aug 11 12:46:54 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
7027
7028         * errfn.c (cp_silent): Declare to mark when we should avoid
7029         emitting warnings and errors.
7030         (cp_error): Check it.
7031         (cp_warning): Likewise.
7032         (cp_pedwarn): Likewise.
7033         (cp_compiler_error): Likewise.
7034         (cp_error_at): Likewise.
7035         (cp_warning_at): Likewise.
7036         (cp_pedwarn_at): Likewise.
7037         * call.c (compute_conversion_costs): Set CP_SILENT when we start
7038         out, and make sure we turn it off before we leave.
7039
7040 Thu Aug 11 00:02:54 1994  Jason Merrill  (jason@deneb.cygnus.com)
7041
7042         * decl2.c (grok_array_decl): Try computing *(A+B) if neither
7043         argument is obviously an array.
7044
7045 Wed Aug 10 15:32:04 1994  Jason Merrill  (jason@deneb.cygnus.com)
7046
7047         * typeck.c (c_expand_start_case): Do cleanups here.
7048
7049         * parse.y (xcond): Do bool conversion here, too.
7050         (simple_stmt, SWITCH case): Don't do cleanups here.
7051
7052         * decl.c (duplicate_decls): Don't treat builtins that have been
7053         explicitly declared specially.
7054
7055 Tue Aug  9 01:16:09 1994  Jason Merrill  (jason@deneb.cygnus.com)
7056
7057         * tree.c (make_deep_copy): Support copying pointer, reference,
7058         function, array, offset and method types.
7059
7060         * decl.c (init_decl_processing): Mark exit and abort as
7061         BUILT_IN_NONANSI so that duplicate_decls is kinder about
7062         redeclaration.
7063         (duplicate_decls): Don't give two errors for redeclaring a C
7064         function with the same parms but a different return type.
7065
7066         * parse.y (paren_cond_or_null): Do cleanup and bool conversion here.
7067         (condition): Instead of here.
7068         (simple_stmt, SWITCH case): Also do cleanup here.
7069
7070         * decl2.c (finish_anon_union): Only break out FIELD_DECLs.
7071
7072         * call.c (build_method_call): Don't throw away the side effects of
7073         the object in a call to a non-existent constructor.
7074         * parse.y (primary): Ditto.
7075
7076         * method.c (build_decl_overload): Oop.
7077
7078         * decl2.c (lang_decode_option): Deal with flag_no_nonansi_builtin,
7079         warn about uselessness of specifying -fansi-overloading.
7080
7081         * method.c (build_decl_overload): Treat any non-member new with one
7082         parameter as __builtin_new.
7083
7084         * decl.c (init_decl_processing): Setup built-in meanings of exit,
7085         _exit and abort.
7086
7087 Mon Aug  8 15:03:30 1994  Jason Merrill  (jason@deneb.cygnus.com)
7088
7089         * error.c (dump_readonly_or_volatile): Put a space between const and
7090         volatile if both apply.
7091
7092         * init.c (perform_member_init): Clean up after this initialization.
7093         (emit_base_init): Clean up after each base init, not after all have
7094         been done.
7095         (expand_aggr_vbase_init_1): Clean up after this init.
7096
7097 Sun Aug  7 14:55:05 1994  Jason Merrill  (jason@deneb.cygnus.com)
7098
7099         * call.c (build_method_call): Deal with destroying references.
7100
7101         * parse.y (condition): Do bool_truthvalue_conversion here.
7102         (paren_expr_or_null): And here.
7103         (simple_if): Not here.
7104         (simple_stmt): Or here.
7105
7106 Sat Aug  6 22:29:45 1994  Jason Merrill  (jason@deneb.cygnus.com)
7107
7108         * parse.y (paren_expr_or_null): Wrap the expression in a
7109         CLEANUP_POINT_EXPR.
7110         (condition): Ditto.
7111
7112 Sat Aug  6 19:46:37 1994  Rohan Lenard  (rjl@easams.com.au)
7113
7114         * call.c (build_scoped_method_call): Fix error message when
7115         destructor call refers to a nonexistent type.
7116
7117 Sat Apr 16 22:43:30 1993  Gerald Baumgartner  (gb@cs.purdue.edu)
7118
7119         * lex.h (rid): Deleted RID_RAISES, it's never used.
7120         Moved RID_PUBLIC, RID_PRIVATE, RID_PROTECTED, RID_EXCEPTION,
7121         RID_TEMPLATE and RID_SIGNATURE to the end of the enumeration,
7122         they don't need to be touched in `grokdeclarator.'
7123         (RID_LAST_MODIFIER): Defined macro to be RID_MUTABLE.
7124
7125         * decl.c (grokdeclarator): Use RID_LAST_MODIFIER instead of
7126         RID_MAX as loop limit for finding declaration specifiers.
7127
7128 Sat Apr  3 21:59:07 1993  Gerald Baumgartner  (gb@cs.purdue.edu)
7129
7130         * lex.c (debug_yytranslate): Moved to parse.y since it needs to
7131         access `yytname,' which is static in parse.c.
7132
7133 Fri Apr  2 23:36:57 1993  Gerald Baumgarnter  (gb@cs.purdue.edu)
7134
7135         * cp-tree.h (GNU_xref_ref): Fixed typo in extern declaration, it
7136         was `GNU_xref_def' instead of `GNU_xref_ref.'
7137
7138 Fri Aug  5 14:20:16 1994  Jason Merrill  (jason@deneb.cygnus.com)
7139
7140         * pt.c (do_function_instantiation): Don't set TREE_PUBLIC and
7141         DECL_EXTERNAL on 'extern' instantiations; wait until EOF to do that.
7142         (do_type_instantiation): Ditto.
7143
7144         * decl2.c (import_export_inline): Decides at EOF what an inline's
7145         linkage should be.
7146         (finish_file): Call it.
7147
7148         * decl.c (start_function): Don't rely on the settings of TREE_PUBLIC
7149         and DECL_EXTERNAL from do_*_instantiation.  Only set
7150         DECL_DEFER_OUTPUT on inlines whose linkage might actually change.
7151         (finish_function): Use DECL_DEFER_OUTPUT to decide which inlines to
7152         mark for later consideration, rather than DECL_FUNCTION_MEMBER_P.
7153
7154 Fri Aug  5 01:12:20 1994  Mike Stump  <mrs@cygnus.com>
7155
7156         * class.c (get_class_offset_1, get_class_offset): New routine to
7157         find the offset of the class where a virtual function is defined,
7158         from the complete type.
7159         * class.c (modify_one_vtable, fixup_vtable_deltas): Use
7160         get_class_offset instead of virtual_offset as get_class_offset will
7161         always provide the right answer.
7162         * tree.c (virtual_offset): Remove.  It only ever worked some of the
7163         time.
7164
7165 Tue Aug  2 12:44:21 1994  Jason Merrill  (jason@deneb.cygnus.com)
7166
7167         * call.c (build_method_call): Put back unary_complex_lvalue call
7168         that I thought was redundant.
7169
7170         * typeck.c (c_expand_return): Fix a case I missed before.
7171
7172 Sun Jul 31 17:54:02 1994  Jason Merrill  (jason@deneb.cygnus.com)
7173
7174         * pt.c (unify): Strip cv-quals from template type arguments (when
7175         'const T*' is matched to 'const char*', that does not mean that T is
7176         'const char').
7177
7178 Fri Jul 29 01:03:06 1994  Jason Merrill  (jason@deneb.cygnus.com)
7179
7180         * pt.c (do_type_instantiation): Instantiate nested TAGS, not
7181         typedefs.  Third time's the charm?
7182
7183         * parse.y (template_parm): Support default template parms.
7184         * pt.c (process_template_parm): Ditto.
7185         (end_template_parm_list): Ditto.
7186         (coerce_template_parms): Ditto.
7187         (mangle_class_name_for_template): Ditto.
7188         (push_template_decls): Ditto.
7189         (unify): Ditto.
7190         * method.c (build_overload_identifier): Ditto.
7191         * error.c (dump_decl): Ditto.
7192
7193 Wed Jul 27 17:47:00 1994  Jason Merrill  (jason@deneb.cygnus.com)
7194
7195         * pt.c (do_type_instantiation): Only instantiate nested *classes*.
7196
7197 Tue Jul 26 13:22:40 1994  Jason Merrill  (jason@deneb.cygnus.com)
7198
7199         * search.c (note_debug_info_needed): Also emit debugging information
7200         for the types of fields.
7201
7202 Mon Jul 25 00:34:44 1994  Jason Merrill  (jason@deneb.cygnus.com)
7203
7204         * pt.c (lookup_template_class): Pass 'template' to
7205         coerce_template_parms instead of 'in_decl', since it's a more
7206         meaningful context.
7207
7208         * typeck.c (c_expand_return): Make sure any cleanups for the return
7209         expression get run.
7210         (build_c_cast): Use CONVERT_EXPR for conversion to void.
7211
7212         * pt.c (do_type_instantiation): Also instantiate nested types.
7213
7214         * typeck.c (convert_for_assignment): Don't die when comparing
7215         pointers with different levels of indirection.
7216
7217         * decl.c (grokdeclarator): The sub-call to grokdeclarator for
7218         class-local typedefs sets DECL_ARGUMENTS, so we need to clear it
7219         out.
7220
7221         * decl2.c (finish_anon_union): Don't die if the union has no
7222         members.
7223
7224         * decl.c (grokdeclarator): Undo changes to declspecs when we're done
7225         so that 'typedef int foo, bar;' will work.
7226
7227         * decl2.c (finish_file): Don't call expand_aggr_init for
7228         non-aggregates.
7229
7230 Mon Jul 25 00:03:10 1994  Teemu Torma  (tot@trema.fi)
7231
7232         * decl.c (finish_function): We can't inline constructors and
7233         destructors under some conditions with -fpic, but don't unset
7234         DECL_INLINE.
7235
7236 Mon Jul 25 00:03:10 1994  Jason Merrill  (jason@deneb.cygnus.com)
7237
7238         * typeck.c (build_object_ref): Make sure 'datum' is a valid object.
7239
7240 Sun Jul 24 14:19:31 1994  Jason Merrill  (jason@deneb.cygnus.com)
7241
7242         * class.c (finish_struct): Don't set DECL_FIELD_BITPOS on
7243         non-fields.
7244         (finish_struct_methods): Use copy_assignment_arg_p.
7245
7246         * cvt.c (cp_convert): If expr is an OFFSET_REF, resolve it instead
7247         of giving an error.
7248
7249         * typeck.c (build_binary_op_nodefault): Don't set result_type if we
7250         don't know how to compare the operands.
7251
7252         * decl.c (grokdeclarator): Avoid seg fault when someone uses '__op'
7253         as a declarator-id in their program.  Like the Linux headers do.
7254         Arrgh.
7255
7256         * tree.c (lvalue_p): Treat calls to functions returning objects by
7257         value as lvalues again.
7258
7259         * typeck.c (build_component_addr): Use convert_force to convert the
7260         pointer in case the component type is also a private base class.
7261
7262         * search.c (get_matching_virtual): Fix bogus warning of overloaded
7263         virtual.
7264
7265         * pt.c (overload_template_name): Set DECL_ARTIFICIAL on the created
7266         TYPE_DECL to fix bogus shadowing warnings.
7267
7268 Fri Jul 22 01:15:32 1994  Jason Merrill  (jason@deneb.cygnus.com)
7269
7270         * init.c (expand_aggr_init_1): const and volatile mismatches do not
7271         prevent a TARGET_EXPR from initializing an object directly.
7272
7273 Tue Jul 19 17:55:37 1994  Jason Merrill  (jason@deneb.cygnus.com)
7274
7275         * cvt.c (build_up_reference): Allow building up references to
7276         `this', don't warn about making references to artificial variables
7277         (like `this').
7278
7279         * tree.c (lvalue_p): `this' is not an lvalue.
7280
7281         * call.c (build_method_call): Accept using a typedef name (or
7282         template type parameter) for explicit destructor calls.
7283
7284 Thu Jul 14 09:42:23 1994  Mike Stump  <mrs@cygnus.com>
7285
7286         * Version 2.6.0 released.
7287
7288 Wed Jul 13 03:57:54 1994  Jason Merrill  (jason@deneb.cygnus.com)
7289
7290         * method.c (hack_identifier): Put back old code so lists of
7291         non-functions will be handled properly.
7292
7293         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): #if 0 out; this macro is now
7294         defined in the language-independent tree.h.
7295
7296         * tree.c (count_functions): Avoid bogus warning when compiling this
7297         function.
7298
7299 Mon Jul 11 18:37:20 1994  Jason Merrill  (jason@deneb.cygnus.com)
7300
7301         * decl.c (grok_reference_init): Always save the initializer of a
7302         reference.
7303
7304 Fri Jul  8 17:41:46 1994  Mike Stump  <mrs@cygnus.com>
7305
7306         * decl.c (cplus_expand_expr_stmt): Wrap statement expressions inside
7307         CLEANUP_POINT_EXPRs so that the stack slots can be reused.
7308         (disabled for now)
7309
7310 Fri Jul  8 12:59:38 1994  Jason Merrill  (jason@deneb.cygnus.com)
7311
7312         * method.c (hack_identifier): Fix for new overloading.
7313
7314         * typeck.c (build_binary_op_nodefault): Don't mess with division by
7315         zero.
7316
7317 Fri Jul  8 13:20:28 1994  Gerald Baumgartner  (gb@cs.purdue.edu)
7318
7319         * decl2.c (finish_file): Only call walk_sigtables, if
7320         flag_handle_signatures is turned on, don't waste time otherwise.
7321
7322 Fri Jul  8 02:27:41 1994  Jason Merrill  (jason@deneb.cygnus.com)
7323
7324         * decl.c (push_overloaded_decl): Don't create overloads of one when
7325         shadowing a class type.
7326         * typeck.c (build_x_function_call): Complain about overloads of one.
7327
7328         * decl.c (grokdeclarator): Don't try to treat a char* as a tree.
7329         (grokdeclarator): Fix setting of TREE_STATIC.
7330         (start_decl): Clear DECL_IN_AGGR_P after calling duplicate_decls.
7331
7332 Thu Jul  7 22:20:46 1994  Gerald Baumgartner  (gb@andros.cygnus.com)
7333
7334         * cp-tree.h (walk_sigtables): Created extern declaration.
7335         * decl2.c (walk_sigtables): Created function, patterned after
7336         walk_vtables, even though we only need it to write out sigtables.
7337         (finish_sigtable_vardecl): Created function.
7338         (finish_vtable_vardecl): Changed 0 to NULL_PTR.
7339         (finish_file): Call walk_sigtables.
7340
7341         * sig.c (build_signature_table_constructor): Mark class member
7342         function pointed to from signature table entry as addressable.
7343
7344 Thu Jul  7 13:39:37 1994  Jason Merrill  (jason@deneb.cygnus.com)
7345
7346         * decl.c (start_decl): Check new decl of static member variable
7347         against the declaration in the class here.
7348         (grokvardecl): Instead of here.
7349
7350         * class.c (prepare_fresh_vtable): Call import_export_vtable if not
7351         -fvtable-thunks.
7352         (build_vtable): Ditto.
7353
7354         * decl2.c (import_export_vtable): Move logic for deciding the
7355         interface of a template class from here.
7356         (import_export_template): To here.
7357         (finish_vtable_vardecl): Call import_export_template before
7358         import_export_vtable.
7359
7360 Wed Jul  6 20:25:48 1994  Mike Stump  <mrs@cygnus.com>
7361
7362         * except.c (init_exception_processing): Setup interim_eh_hook to
7363         call lang_interim_eh. 
7364         * except.c (do_unwind): Propagate throw object value across
7365         stack unwinding.
7366         * except.c (saved_throw_value): Used to hold the value of the object
7367         being thrown.  It is always a reference to the real value.
7368         * except.c (expand_start_catch_block): Add handling for the
7369         value of the exception object.
7370         * except.c (expand_start_catch_block): Add handler for the handler,
7371         so that throws inside the handler go to the outer block.
7372         * except.c (expand_end_catch_block): Ditto.
7373         * parse.y (handler_args): Use parm instead, as the other doesn't yet
7374         handle references correctly.
7375
7376 Wed Jul  6 17:55:32 1994  Per Bothner  (bothner@kalessin.cygnus.com)
7377
7378         * decl2.c (mark_vtable_entries):  If -ftable-thunks, set the
7379         vtable entry properly to abort.
7380
7381 Tue Jul  5 14:07:54 1994  Jason Merrill  (jason@deneb.cygnus.com)
7382
7383         * typeck.c (build_binary_op_nodefault): Downgrade division by zero
7384         errors to warnings.
7385
7386         * call.c (build_overload_call_real): Handle fnname being a list of
7387         functions.
7388         * typeck.c (build_x_function_call): Pass list of functions to
7389         build_overload_call, not just the name.
7390         * tree.c (count_functions): Complain when called for invalid
7391         argument.
7392
7393         * decl.c (grokdeclarator): Fix settings of TREE_STATIC, TREE_PUBLIC
7394         and DECL_EXTERNAL on static members and initialized const members.
7395         * decl2.c (grokfield): Reflect this change.
7396
7397 Fri Jul  1 09:35:51 1994  Jason Merrill  (jason@deneb.cygnus.com)
7398
7399         * parse.y (init): ANSI C++ does not forbid { }.
7400
7401 Thu Jun 30 00:35:22 1994  Jason Merrill  (jason@deneb.cygnus.com)
7402
7403         * decl2.c (lang_decode_option): Set warn_nonvdtor along with -Wall.
7404         warn_nonvdtor defaults to off.
7405
7406         * class.c (instantiate_type): Use comptypes rather than relying on 
7407         types to satisfy ==.
7408
7409         * decl.c (start_function): Set DECL_DEFER_OUTPUT on all inlines that
7410         might be static.
7411
7412         * tree.c (build_cplus_new): Never build WITH_CLEANUP_EXPRs.
7413
7414         * decl.c (grok_reference_init): Deal with ADDR_EXPRs of TARGET_EXPRs.
7415
7416         * cvt.c (cp_convert): Pass 0 to with_cleanup_p arg of
7417         build_cplus_new.
7418
7419 Wed Jun 29 22:31:09 1994  Jason Merrill  (jason@deneb.cygnus.com)
7420
7421         * decl2.c (finish_file): Maybe consider static inlines multiple
7422         times, in case they reference each other.
7423
7424 Tue Jun 28 11:58:38 1994  Gerald Baumgartner  (gb@cs.purdue.edu)
7425
7426         * class.c (finish_struct): Don't `cons_up_default_function's
7427         for signatures.
7428         (finish_struct): Handle an empty method_vec correctly.
7429
7430         * decl.c (grokdeclarator): Don't warn about a signature being
7431         empty in a signature pointer declaration if we only saw a
7432         forward declaration of the signature.  Changed `warning's into
7433         `cp_warning's.
7434
7435         * sig.c (build_sigtable): Don't die if a null signature table
7436         constructor is returned.
7437         (build_signature_pointer_constructor): If the signature table
7438         constructor is null, the _sptr field is set to a null pointer
7439         and cast to the appropriate type.  Make copies of all null
7440         pointers so that the type null_pointer_node doesn't get changed.
7441         (build_signature_table_constructor): Added comments.
7442
7443         * sig.c (build_signature_pointer_constructor): Complain if we
7444         try to assign to/initialize a signature pointer/reference of
7445         an undefined signature.
7446
7447 Mon Jun 27 14:05:16 1994  Gerald Baumgartner  (gb@cs.purdue.edu)
7448
7449         * typeck2.c (store_init_value): Don't be pedantic about
7450         non-constant initializers of signature tables/pointers/references.
7451
7452 Fri Jun 24 16:49:41 1994  Gerald Baumgartner  (gb@cs.purdue.edu)
7453
7454         * decl.c (grokdeclarator): If we are grokking an opaque typedef
7455         in a signature, don't complain about it begin static.
7456
7457 Wed Jun 29 16:44:45 1994  Mike Stump  <mrs@cygnus.com>
7458
7459         Fixes a problem of the this pointer being wrong in virtual calls to
7460         methods that are not overridden in more derived classes.
7461
7462         * class.c (fixup_vtable_delta): New routine.  It will fixup the
7463         delta entries in vtables, wheever they need updating.
7464         * class.c (finish_struct): Call the new routine for all virtual
7465         bases, as they can have different offsets, than those used in base
7466         classes that we derive our vtable from.
7467
7468 Tue Jun 28 23:49:28 1994  Jason Merrill  (jason@deneb.cygnus.com)
7469
7470         * typeck.c (build_binary_op): Use the types before default
7471         conversions in the error message.
7472
7473         * *.c: Use c_build_type_variant instead of build_type_variant where
7474         the type might be an array.
7475
7476         * call.c (build_method_call): Call build_type_variant and
7477         build_reference_type in the right order.
7478         * decl.c (record_builtin_type): Ditto.
7479
7480 Wed Jun 29 16:58:53 1994  Jason Merrill  (jason@deneb.cygnus.com)
7481
7482         * call.c (build_method_call): Call build_type_variant and
7483         build_reference_type in the right order.
7484         * decl.c (record_builtin_type): Ditto.
7485
7486 Tue Jun 28 23:49:28 1994  Jason Merrill  (jason@deneb.cygnus.com)
7487
7488         * typeck.c (build_binary_op): Use the types before default
7489         conversions in the error message.
7490
7491         * *.c: Use c_build_type_variant instead of build_type_variant where
7492         the type might be an array.
7493
7494 Sat Jun 25 11:50:54 1994  Jason Merrill  (jason@deneb.cygnus.com)
7495
7496         * cvt.c (convert_to_reference): Try UDC's before doing the
7497         reinterpret_cast thang, though.
7498
7499 Fri Jun 24 01:24:01 1994  Jason Merrill  (jason@deneb.cygnus.com)
7500
7501         * typeck.c (c_expand_return): Don't USE the return value location
7502         after we've expanded the jump.
7503
7504         * decl2.c (finish_file): Make sure DECL_SAVED_INSNS is not 0 before
7505         trying to write out an inline.
7506
7507         * cvt.c (build_up_reference): Also do address adjustment when the
7508         target type uses MI.
7509         (convert_to_reference): Try UDCs only after built-in conversions.
7510         (build_type_conversion_1): Don't play games with the argument to the
7511         method.
7512         (build_type_conversion): #if 0 out code for binding to reference.
7513
7514 Thu Jun 23 00:22:28 1994  Jason Merrill  (jason@deneb.cygnus.com)
7515
7516         * decl2.c (finish_file): Use TREE_SYMBOL_REFERENCED to decide
7517         whether to emit inlines.
7518
7519         * decl.c (grokdeclarator): Set explicit_int for decls that just
7520         specify, say, 'long'.
7521
7522         * init.c (do_friend): Do overload C functions (or call pushdecl,
7523         anyaway).
7524
7525 Wed Jun 22 13:40:49 1994  Jason Merrill  (jason@deneb.cygnus.com)
7526
7527         * cvt.c (build_up_reference): Don't call readonly_error.
7528         (convert_to_reference): Propagate const and volatile from expr to
7529         its type.
7530
7531         * tree.c (lvalue_p): Random CALL_EXPRs are not lvalues.
7532
7533         * cvt.c (build_up_reference): Break out WITH_CLEANUP_EXPR when
7534         creating a temporary.
7535         (convert_to_reference): Lose excessive and incorrect trickiness.
7536         (cp_convert): Call build_cplus_new with with_cleanup_p set.
7537
7538         * typeck2.c (build_functional_cast): Ditto.
7539
7540 Tue Jun 21 17:38:38 1994  Jason Merrill  (jason@deneb.cygnus.com)
7541
7542         * decl.c (grokdeclarator): signed, unsigned, long and short all
7543         imply 'int'.
7544
7545         * decl.c (grokdeclarator): Allow "this is a type" syntax.
7546         (grok_reference_init): Simplify and fix.
7547
7548 Sun Jun 19 17:08:48 1994  Jason Merrill  (jason@deneb.cygnus.com)
7549
7550         * decl.c (grokdeclarator): pedwarn about a typedef that specifies no
7551         type.
7552
7553 Sat Jun 18 04:16:50 1994  Jason Merrill  (jason@deneb.cygnus.com)
7554
7555         * decl.c (start_function): Move TREE_PUBLIC and DECL_EXTERNAL
7556         tinkering to after call to pushdecl.
7557
7558 Fri Jun 17 14:48:28 1994  Jason Merrill  (jason@deneb.cygnus.com)
7559
7560         * call.c (build_method_call): Handle destructors for non-aggregate
7561         types properly.
7562
7563 Thu Jun 16 16:48:05 1994  Jason Merrill  (jason@deneb.cygnus.com)
7564
7565         * call.c (build_method_call): Make sure that the name given for the
7566         destructor matches the constructor_name of the instance.
7567
7568         * pt.c (do_function_instantiation): A non-extern instantiation
7569         overrides a later extern one.
7570         (do_type_instantiation): Ditto.
7571
7572 Wed Jun 15 19:34:54 1994  Jason Merrill  (jason@deneb.cygnus.com)
7573
7574         * init.c (expand_aggr_init): Use TYPE_MAIN_VARIANT to get the
7575         unqualified array type.
7576
7577         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Tests whether NODE is a
7578         CONSTRUCTOR with no elements.
7579
7580         * decl.c (various): Lose empty_init_node.
7581         (finish_decl): Use EMPTY_CONSTRUCTOR_P, do the empty CONSTRUCTOR
7582         thing depending on the value of DECL_COMMON instead of
7583         flag_conserve_space, do the empty CONSTRUCTOR thing for types that
7584         don't have constructors, don't treat a real empty CONSTRUCTOR
7585         specially.
7586
7587         * typeck2.c (process_init_constructor): Don't treat empty_init_node
7588         specially.
7589
7590 Wed Jun 15 19:05:25 1994  Mike Stump  <mrs@cygnus.com>
7591
7592         * class.c (override_one_vtable): Don't forget to merge in an old
7593         overrider when we wanted to reuse a vtable, but couldn't.
7594
7595 Wed Jun 15 15:03:16 1994  Jason Merrill  (jason@deneb.cygnus.com)
7596
7597         * decl.c (start_decl): Put statics in common again.
7598
7599         * decl.c (grokdeclarator): Return NULL_TREE for an error rather than
7600         setting the type to error_mark_node.
7601
7602         * typeck.c (build_modify_expr): Build up a COMPOUND_EXPR for enum
7603         bitfield assignments.
7604
7605 Tue Jun 14 12:23:38 1994  Jason Merrill  (jason@deneb.cygnus.com)
7606
7607         * decl.c (grok_op_properties): Const objects can be passed by value.
7608
7609 Mon Jun 13 03:10:59 1994  Jason Merrill  (jason@deneb.cygnus.com)
7610
7611         * decl2.c (import_export_vtable): Force implicit instantiations to
7612         be interface_only when -fno-implicit-templates.
7613
7614         * decl.c (duplicate_decls): Redeclaring a class template name is an
7615         error.
7616
7617         * pt.c (end_template_decl): Call GNU_xref_decl for class templates.
7618         * xref.c (GNU_xref_decl): Support templates.
7619
7620 Sat Jun 11 17:09:05 1994  Jason Merrill  (jason@deneb.cygnus.com)
7621
7622         * decl.c (grok_op_properties): Split out checking for whether this
7623         function should suppress the default assignment operator.
7624         * decl2.c (grok_function_init): Ditto.
7625         (copy_assignment_arg_p): New function do do just that.
7626         Now considers virtual assignment operators that take a base as an
7627         argument to count as copy assignment operators.
7628
7629         * search.c (dfs_debug_mark): Lose checks for DWARF_DEBUG and
7630         TREE_ASM_WRITTEN, as they are redundant.
7631
7632         * pt.c (end_template_decl): Don't try to set DECL_CLASS_CONTEXT on a
7633         decl that has no LANG_SPECIFIC part.
7634         (do_type_instantiation): Force the debugging information for this
7635         type to be emitted.
7636
7637         * decl.c (start_decl): Clear up uses of various types of templates
7638         (say sorry for static data members, rather than "invalid template"). 
7639         (expand_static_init): Fix initialization of static data members of
7640         template classes.
7641
7642 Fri Jun 10 00:41:19 1994  Jason Merrill  (jason@deneb.cygnus.com)
7643
7644         * decl.c (grokdeclarator): Set DECL_CONTEXT on static data members.
7645
7646         * g++.c (main): Use -xc++-cpp-output for .i files.
7647
7648         * pt.c (tsubst): Give meaningful error about declaring template for
7649         a copy constructor which was not declared in the class template.
7650         (do_type_instantiation): Explicit instantiation before the class
7651         template is an error.
7652         (instantiate_template): Don't die if tsubst returns error_mark_node.
7653
7654 Thu Jun  9 19:04:59 1994  Jason Merrill  (jason@deneb.cygnus.com)
7655
7656         Don't synthesize the copy assignment operator if the one in a base
7657         class is pure virtual.
7658         * cp-tree.h (TYPE_HAS_ABSTRACT_ASSIGN_REF): New macro to indicate
7659         whether the type has a pure virtual copy assignment operator.
7660         * class.c (finish_base_struct): Don't generate the copy assignment
7661         operator if a base class has a pure virtual one.
7662         * decl.c (grok_op_properties): Add disabled code to set
7663         TYPE_HAS_ABSTRACT_ASSIGN_REF with comment pointing to where it is
7664         actually set.
7665         * decl2.c (grok_function_init): Set TYPE_HAS_ABSTRACT_ASSIGN_REF.
7666
7667         * decl2.c (import_export_vtable): Always treat template
7668         instantiations as if write_virtuals >= 2, and treat implicit
7669         instantiations as external if -fno-implicit-templates.
7670         (finish_file): Output all pending inlines if
7671         flag_keep_inline_functions.
7672
7673 Wed Jun  8 20:48:02 1994  Mike Stump  <mrs@cygnus.com>
7674
7675         * tree.c (layout_vbasetypes): Align virtual base classes inside
7676         complete objects, so that we don't core dump on machines such as
7677         SPARCs when we access members that require larger than normal
7678         alignments, such as a double.  Also, we bump up the total alignment
7679         on the complete type, as necessary.
7680
7681 Wed Jun  8 16:18:14 1994  Jason Merrill  (jason@deneb.cygnus.com)
7682
7683         * gxxint.texi (Free Store): New section with code for examining
7684         cookie.
7685         (Limitations of g++): Remove operator delete entry, since it is no
7686         longer accurate.  Fix access control entry.
7687
7688         * typeck.c (build_unary_op): Pedwarn about taking the address of or
7689         incrementing a cast to non-reference type.
7690         (build_modify_expr): Use convert instead of convert_force again.
7691
7692         * search.c (get_base_distance): Use IS_AGGR_TYPE_CODE to check for
7693         class type, not == RECORD_TYPE.
7694
7695         * decl.c (grokdeclarator): Cope with grokfndecl returning NULL_TREE.
7696
7697         * typeck2.c (report_case_error): #if 0 out.
7698         * lex.c (real_yylex): Lose RANGE.
7699         * parse.y: Ditto.
7700
7701 Tue Jun  7 18:17:35 1994  Jason Merrill  (jason@deneb.cygnus.com)
7702
7703         * parse.y (simple_stmt, case ranges): Use ELLIPSIS instead of RANGE.
7704
7705 Mon Jun  6 19:39:57 1994  Jason Merrill  (jason@deneb.cygnus.com)
7706
7707         * typeck.c (build_c_cast): Don't shortcut conversions to the same
7708         type.  Don't replace consts with their values here, since that's now
7709         done in cp_convert.
7710
7711         * cvt.c (cp_convert): When converting to bool, take
7712         integer_zero_node to false_node and all other INTEGER_CSTs to
7713         true_node.
7714         (build_type_conversion): Don't complain about multiple conversions
7715         to float if we're not really converting.
7716
7717 Fri Jun  3 02:10:56 1994  Jason Merrill  (jason@deneb.cygnus.com)
7718
7719         Implement 'extern template class A<int>;' syntax for suppressing
7720         specific implicit instantiations.
7721         * cp-tree.h: Update prototypes for do_*_instantiation.
7722         * pt.c (do_pending_expansions): Don't compile 'extern' explicit
7723         instantiations.
7724         (do_function_instantiation): Set DECL_EXTERNAL on 'extern' explicit
7725         instantiations.
7726         (do_type_instantiation): Ditto.
7727         * parse.y (explicit_instantiation): Support 'extern template class
7728         A<int>;' syntax.
7729         * decl.c (start_function): Don't modify the settings of TREE_PUBLIC
7730         and DECL_EXTERNAL on explicit instantiations.
7731
7732         * cvt.c (cp_convert): Replace constants with their values before
7733         converting.
7734         (cp_convert): Consistently use 'e' instead of 'expr'.
7735
7736 Thu Jun  2 03:53:30 1994  Jason Merrill  (jason@deneb.cygnus.com)
7737
7738         * typeck2.c (build_x_arrow): Resolve OFFSET_REFs first.
7739
7740 Wed Jun  1 18:57:35 1994  Jason Merrill  (jason@deneb.cygnus.com)
7741
7742         * typeck2.c (digest_init): Handle initializing a pmf with an
7743         overloaded method.
7744         * typeck.c (build_ptrmemfunc): Handle overloaded methods.
7745
7746         * decl.c (pushtag): Use build_decl to make TYPE_DECLs.
7747         (xref_defn_tag): Ditto.
7748         * pt.c (process_template_parm): Ditto.
7749         (lookup_template_class): Ditto.
7750         (push_template_decls): Ditto.
7751         (instantiate_class_template): Ditto.
7752         (create_nested_upt): Ditto.
7753         * class.c (finish_struct): Don't try to set DECL_CLASS_CONTEXT on
7754         TYPE_DECLs.
7755
7756         * typeck.c (convert_arguments): Make sure type is not NULL before
7757         checking its TREE_CODE.
7758
7759 Wed Jun  1 17:40:39 1994  Mike Stump  <mrs@cygnus.com>
7760
7761         * class.c (get_derived_offset): New routine.
7762         * class.c (finish_base_struct): Make sure we set BINFO_VTABLE and
7763         BINFO_VIRTUALS when we choose a new base class to inherit from.
7764         * class.c (modify_one_vtable): Use get_derived_offset to get the
7765         offset to the most base class subobject that we derived this binfo
7766         from.
7767         * class.c (finish_struct): Move code to calculate the
7768         DECL_FIELD_BITPOS of the vfield up, as we need might need it for
7769         new calls to get_derived_offset in modify_one_vtable.
7770
7771 Wed Jun  1 16:50:59 1994  Jason Merrill  (jason@deneb.cygnus.com)
7772
7773         * init.c (build_member_call): Use build_pointer_type instead of
7774         TYPE_POINTER_TO.
7775
7776 Wed Jun  1 11:11:15 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
7777
7778         * decl.c (grokdeclarator): Make sure we have a DNAME set before we
7779         try to use it in an error.
7780
7781 Wed Jun  1 09:48:49 1994  Mike Stump  <mrs@cygnus.com>
7782
7783         * typeck.c (convert_arguments, convert_for_initialization): Don't
7784         strip NOP_EXPRs, when we are converting to a reference.
7785
7786 Wed Jun  1 01:11:38 1994  Jason Merrill  (jason@deneb.cygnus.com)
7787
7788         * typeck.c (build_modify_expr): Don't dereference references when
7789         initializing them.
7790
7791         * decl2.c (grokfield): Don't check for grokdeclarator returning
7792         error_mark_node any more.
7793
7794         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
7795         (start_method): Return void_type_node instead of error_mark_node.
7796
7797         * typeck.c (build_modify_expr): Resolve offset refs earlier.
7798
7799 Tue May 31 16:06:58 1994  Jason Merrill  (jason@deneb.cygnus.com)
7800
7801         * call.c (build_method_call): Resolve OFFSET_REFs in the object.
7802
7803         * typeck.c (build_modify_expr): Dereference references before trying
7804         to assign to them.
7805
7806         * call.c (build_method_call): Don't confuse type conversion
7807         operators with constructors.
7808         * typeck2.c (build_functional_cast): Just call build_c_cast if there
7809         was only one parameter.
7810         * method.c (build_typename_overload): Don't set
7811         IDENTIFIER_GLOBAL_VALUE on these identifiers.
7812         * decl.c (grok_op_properties): Warn about defining a type conversion
7813         operator that converts to a base class (or reference to it).
7814         * cvt.c (cp_convert): Don't try to use a type conversion operator
7815         when converting to a base class.
7816         (build_type_conversion_1): Don't call constructor_name_full on an
7817         identifier.
7818         * cp-tree.h (DERIVED_FROM_P): Should be self-explanatory.
7819
7820         * decl.c (start_decl): Don't complain that error_mark_node is an
7821         incomplete type.
7822         (finish_decl): Check for type == error_mark_node.
7823
7824 Mon May 30 23:38:55 1994  Jason Merrill  (jason@deneb.cygnus.com)
7825
7826         * decl.c (start_function): Set DECL_DEFER_OUTPUT on implicit
7827         instantiations and inline members.
7828
7829         * spew.c (yylex): Set looking_for_template if the next token is a '<'.
7830
7831         * lex.h: Declare looking_for_template.
7832
7833         * decl.c (lookup_name_real): Use looking_for_template to arbitrate
7834         between type and template interpretations of an identifier.
7835
7836 Sat May 28 04:07:40 1994  Jason Merrill  (jason@deneb.cygnus.com)
7837
7838         * pt.c (instantiate_template): Zero out p if we found a
7839         specialization.
7840
7841         * decl.c (grokdeclarator): Elucidate warning.
7842         (grokdeclarator): If pedantic AND -ansi, complain about long long.
7843
7844         Make explicit instantiation work reasonably.  It is now appropriate
7845         to deprecate the use of -fexternal-templates.
7846         * pt.c (instantiate_template): Set DECL_TEMPLATE_SPECIALIZATION or
7847         DECL_IMPLICIT_INSTANTIATION on fndecl as appropriate.
7848         (end_template_instantiation): Reflect changes in USE_TEMPLATE
7849         semantics.
7850         (do_pending_expansions): if (!flag_implicit_templates) DECIDE(0);
7851         (do_function_instantiation): Don't set EXPLICIT_INST if
7852         flag_external_templates is set.  Do set TREE_PUBLIC and DECL_EXTERN
7853         appropriately otherwise.
7854         (do_type_instantiation): Set interface info for class.  Set
7855         TREE_PUBLIC and DECL_EXTERN for methods.  Do none of this if
7856         flag_external_templates is set.
7857         * parse.y: Reflect changes in USE_TEMPLATE semantics.
7858         * decl2.c: New flag flag_implicit_templates determines whether or
7859         not implicit instantiations get emitted.  This flag currently
7860         defaults to true, and must be true for -fexternal-templates to work.
7861         (finish_file): Consider flag_implement_inlines when
7862         setting DECL_EXTERNAL.  Consider flag_implicit_templates when
7863         deciding whether or not to emit a static copy.
7864         * decl.c (start_function): Set TREE_PUBLIC and DECL_EXTERNAL
7865         properly for template instantiations.
7866         (start_method): Set DECL_IMPLICIT_INSTANTIATION on methods of a
7867         template class.
7868         * cp-tree.h (CLASSTYPE_USE_TEMPLATE): Change semantics.
7869         (DECL_USE_TEMPLATE): Parallel macro for FUNCTION and VAR_DECLs.
7870         (various others): Accessor macros for the above.
7871
7872 Fri May 27 13:57:40 1994  Jason Merrill  (jason@deneb.cygnus.com)
7873
7874         * typeck.c (build_binary_op_nodefault): Division by constant zero is
7875         an error.
7876
7877 Fri May 27 13:50:15 1994  Mike Stump  <mrs@cygnus.com>
7878
7879         * class.c (override_one_vtable): Don't modify things we don't own.
7880
7881 Fri May 27 01:42:58 1994  Jason Merrill  (jason@deneb.cygnus.com)
7882
7883         * decl.c (finish_decl): Don't postpone processing the initializer of
7884         a decl with DECL_EXTERNAL set, and do call rest_of_compilation for a
7885         PUBLIC const at toplevel.
7886         (grokdeclarator): pedwarn about initializing non-const or
7887         non-integral statics in the class body.
7888
7889         * decl.c (pushtag): Don't try to set DECL_CLASS_CONTEXT on a
7890         TYPE_DECL.
7891
7892         * call.c (convert_harshness): Dereference reference on rhs before
7893         proceeding, properly grok passing const things to non-const
7894         references.
7895
7896         * typeck.c (build_unary_op): Soften error about taking the address
7897         of main() to a pedwarn.
7898
7899         * lex.c (default_copy_constructor_body): Unambiguously specify base
7900         classes (i.e. A((const class ::A&)_ctor_arg) ).
7901         (default_assign_ref_body): Ditto.
7902
7903 Thu May 26 13:13:55 1994  Gerald Baumgartner  (gb@mexican.cygnus.com)
7904
7905         * decl2.c (grokfield): Don't complain about local signature
7906         method declaration without definition.
7907
7908         * call.c (convert_harshness): If `type' is a signature pointer
7909         and `parmtype' is a pointer to a signature, just return 0.  We
7910         don't really convert in this case; it's a result of making the
7911         `this' parameter of a signature method a signature pointer.
7912
7913         * call.c (build_method_call): Distinguish calling the default copy
7914         constructor of a signature pointer/reference from a signature
7915         member function call.
7916
7917 Thu May 26 12:56:25 1994  Jason Merrill  (jason@deneb.cygnus.com)
7918
7919         * decl2.c (grokfield): Don't set TREE_PUBLIC on member function
7920         declarations.
7921
7922         * decl.c (duplicate_decls): A previous function declaration as
7923         static overrides a subsequent non-static definition.
7924         (grokdeclarator): Don't set TREE_PUBLIC on inline method
7925         declarations.
7926
7927 Wed May 25 14:36:38 1994  Jason Merrill  (jason@deneb.cygnus.com)
7928
7929         * decl.c (grokdeclarator): Handle initialization of static const
7930         members.
7931         (finish_decl): Ditto.
7932
7933         * decl2.c (grokfield): Allow initialization of static const members
7934         even when pedantic.
7935
7936         * decl2.c (grokfield): Deal with grokdeclarator returning
7937         error_mark_node.
7938
7939         * decl.c (grok_ctor_properties): Return 0 for A(A) constructor.
7940         (grokfndecl): Check the return value of grok_ctor_properties.
7941         (start_method): Ditto.
7942
7943         * parse.y (absdcl): Expand type_quals inline.
7944
7945 Tue May 24 19:10:32 1994  Jason Merrill  (jason@deneb.cygnus.com)
7946
7947         * decl.c (pushtag): Use IS_AGGR_TYPE rather than checking for a
7948         RECORD_TYPE.
7949
7950 Tue May 24 18:09:16 1994  Per Bothner  (bothner@kalessin.cygnus.com)
7951
7952         * cp-tree.h (VTABLE_NAME_FORMAT):  If flag_vtable_thunks,
7953         always use "__vt_%s".
7954         * decl2.c (finish_vtable_vardecl):  Don't consider abstract virtuals
7955         when looking for a "sentinal" method (to decide on emitting vtables).
7956         * decl2.c (finish_file):  Scan all decls for thunks that need
7957         to be emitted.
7958         * decl2.c (finish_vtable_vardecl):  Don't bother calling emit_thunk.
7959         * method.c (make_thunk):  Use a more meaningful label.  If there
7960         exists a matching top-level THUNK_DECL re-use it;  otherwise
7961         create a new THUNK_DECL (and declare it).
7962         * method.c (emit_thunk):  Make thunk external/public depending
7963         on the underlying method.
7964
7965 Tue May 24 00:22:04 1994  Jason Merrill  (jason@deneb.cygnus.com)
7966
7967         * pt.c (tsubst): Use lookup_name_nonclass to find guiding decls, not
7968         lookup_name.
7969
7970         * call.c (build_overload_call_real): Don't immediately pick a
7971         function which matches perfectly.
7972
7973         * decl.c (grokdeclarator): Use c_build_type_variant for arrays.
7974         (grokdeclarator): Warn about, and throw away, cv-quals attached to a
7975         reference (like 'int &const j').
7976
7977         * typeck.c (convert_arguments): Don't mess with i for methods.
7978         * call.c (build_method_call): Pass the function decl to
7979         convert_arguments.
7980
7981         * typeck.c (comp_ptr_ttypes_real): New function.  Implements the
7982         checking for which multi-level pointer conversions are allowed.
7983         (comp_target_types): Call it.
7984         (convert_for_assignment): Check const parity on the ultimate target
7985         type, too.  And make those warnings pedwarns.
7986
7987 Mon May 23 14:11:24 1994  Jason Merrill  (jason@deneb.cygnus.com)
7988
7989         * error.c (dump_char): Use TARGET_* for character constants.
7990
7991 Mon May 23 13:03:03 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
7992
7993         * tree.c (debug_no_list_hash): Make static.
7994
7995         * decl.c (decls_match): Say the types don't match if newdecl ends up
7996         with a null type, after we've checked if olddecl does.
7997         (pushdecl): Check if the decls themselves match before looking for
7998         an extern redeclared as static, to avoid inappropriate and incorrect
7999         warnings.
8000
8001 Fri May 20 14:04:34 1994  Jason Merrill  (jason@deneb.cygnus.com)
8002
8003         * decl.c (grokdeclarator): Make warning about duplicate short, etc.
8004         a pedwarn.
8005
8006         * typeck.c (build_c_cast): Casting to function or method type is an
8007         error.
8008
8009         * class.c (finish_struct): Make warning for anonymous class with no
8010         instances a pedwarn.
8011
8012         * Makefile.in (stamp-parse): Expect a s/r conflict.
8013
8014         * typeck.c (build_modify_expr): pedwarn about using a non-lvalue
8015         cast as an lvalue.
8016
8017 Thu May 19 12:08:48 1994  Jason Merrill  (jason@deneb.cygnus.com)
8018
8019         * cvt.c (type_promotes_to): Make sure bool promotes to int rather
8020         than unsigned on platforms where sizeof(char)==sizeof(int).
8021
8022 Wed May 18 14:27:06 1994  Jason Merrill  (jason@deneb.cygnus.com)
8023
8024         * typeck.c (build_c_cast): Tack on a NOP_EXPR when casting to
8025         another variant.
8026         (build_modify_expr): Don't strip NOP_EXPRs, and don't get tricky
8027         and treat them as lvalues.
8028
8029         * decl.c (shadow_tag): Do complain about forward declarations of
8030         enums and empty declarations.
8031         * parse.y: Don't complain about forward declarations of enums and
8032         empty declarations.
8033
8034         * typeck.c (convert_for_assignment): Complain about changing
8035         the signedness of a pointer's target type.
8036
8037         * parse.y (stmt): Move duplicated code for checking case values from
8038         here.
8039         * decl2.c (check_cp_case_value): To here.  And add a call to
8040         constant_expression_warning.
8041
8042         * typeck.c (convert_for_assignment): Don't complain about assigning
8043         a negative value to bool.
8044
8045         * decl.c (init_decl_processing): Make bool unsigned.
8046
8047         * class.c (finish_struct): Allow bool bitfields.
8048
8049 Wed May 18 12:35:27 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
8050
8051         * Make-lang.in (c++.install-man): Get g++.1 from $(srcdir)/cp.
8052
8053 Wed May 18 03:28:35 1994  Jason Merrill  (jason@deneb.cygnus.com)
8054
8055         * cvt.c (build_type_conversion): Lose special handling of
8056         truthvalues.
8057
8058         * search.c (dfs_pushdecls): Improve shadowing warning.
8059
8060 Tue May 17 13:34:46 1994  Jason Merrill  (jason@deneb.cygnus.com)
8061
8062         * init.c (build_delete): Throw away const and volatile on `this'.
8063
8064         * decl.c (finish_enum): Put the constants in TYPE_VALUES again,
8065         rather than the enumerators.
8066         (pushtag): s/cdecl/c_decl/g
8067
8068 Mon May 16 23:04:01 1994  Stephen R. van den Berg  (berg@pool.informatik.rwth-aachen.de)
8069
8070         * cp/typeck.c (common_type): Attribute merging.
8071         (comp_types): Utilise COMP_TYPE_ATTRIBUTES macro.
8072
8073         * cp/parse.y: Revamp attribute parsing.
8074
8075 Mon May 16 01:40:34 1994  Jason Merrill  (jason@deneb.cygnus.com)
8076
8077         * decl.c (shadow_tag): Also check for inappropriate use of auto and
8078         register.
8079
8080         * method.c (build_overload_name): Clarify that the illegal case is a
8081         pointer or reference to array of unknown bound.
8082
8083         * error.c (dump_type_prefix): Print references to arrays properly.
8084
8085         * typeck.c (various): Be more helpful in pointer
8086         comparison diagnostics.
8087
8088         * tree.c (lvalue_p): MODIFY_EXPRs are lvalues again.  Isn't this
8089         fun?
8090
8091         * parse.y: Also catch an error after valid stmts.
8092
8093         * search.c (dfs_init_vbase_pointers): Don't abort because `this' is
8094         const.
8095
8096         * typeck.c (convert_for_initialization): If call to
8097         convert_to_reference generated a diagnostic, print out the parm
8098         number and function decl if any.
8099
8100         * errfn.c (cp_thing): Check atarg1 to determine whether or not we're
8101         specifying a line, not atarg.
8102
8103         * tree.c (build_cplus_method_type): Always make `this' const.
8104
8105         * decl2.c (grokclassfn): If -fthis-is-variable and this function is
8106         a constructor or destructor, make `this' non-const.
8107
8108         * typeck.c (build_modify_expr): Don't warn specially about
8109         assignment to `this' here anymore, since it will be caught by the
8110         usual machinery.
8111
8112         * various: Disallow specific GNU extensions (variable-size arrays,
8113         etc.) when flag_ansi is set, not necessarily when pedantic is set,
8114         so that people can compile with -pedantic-errors for tighter const
8115         checking and such without losing desirable extensions.
8116
8117         * typeck2.c (build_functional_cast): Call build_method_call with
8118         LOOKUP_PROTECT.
8119         (process_init_constructor): Only process FIELD_DECLs.
8120
8121         * decl.c (finish_decl): Also force static consts with no explicit
8122         initializer that need constructing into the data segment.
8123
8124         * init.c (build_delete): Undo last patch, as it interferes with
8125         automatic cleanups.
8126
8127 Sat May 14 01:59:31 1994  Jason Merrill  (jason@deneb.cygnus.com)
8128
8129         * call.c, class.h, cp-tree.h, cvt.c, decl2.c: Lose old overloading
8130         code.
8131
8132         * init.c (build_delete): pedwarn about using plain delete to delete
8133         an array.
8134
8135 Fri May 13 16:45:07 1994  Jason Merrill  (jason@deneb.cygnus.com)
8136
8137         * typeck.c (comp_target_types): Be more helpful in contravariance
8138         warnings, and make them pedwarns.
8139
8140         * decl.c (grokdeclarator): Use decl_context to decide whether or not
8141         this is an access declaration.
8142
8143         * class.c (finish_struct_bits): Set TYPE_HAS_INT_CONVERSION if it
8144         has a conversion to enum or bool, too.
8145
8146 Fri May 13 16:31:27 1994  Mike Stump  <mrs@cygnus.com>
8147
8148         * method.c (emit_thunk):  Make declaration for
8149         current_call_is_indirect local (needed for hppa).
8150
8151 Fri May 13 16:16:37 1994  Jason Merrill  (jason@deneb.cygnus.com)
8152
8153         * pt.c (uses_template_parms): Grok BOOLEAN_TYPE.
8154         (tsubst): Ditto.
8155
8156 Fri May 13 16:23:32 1994  Mike Stump  <mrs@cygnus.com>
8157
8158         * pt.c (tsubst): If there is already a function for this expansion,
8159         use it.
8160         * pt.c (instantiate_template): Ditto.
8161
8162 Fri May 13 10:30:42 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
8163
8164         * parse.y (implicitly_scoped_stmt, simple_stmt case): Use
8165         kept_level_p for MARK_ENDS argument to expand_end_bindings, to avoid
8166         generating debug info for unemitted symbols on some systems.
8167
8168         * cp-tree.h (build_static_cast, build_reinterpret_cast,
8169         build_const_cast): Add declarations.
8170
8171 Fri May 13 09:50:31 1994  Mike Stump  <mrs@cygnus.com>
8172
8173         * search.c (expand_indirect_vtbls_init): Fix breakage from Apr 27
8174         fix.  We now try get_binfo, and if that doesn't find what we want,
8175         we go back to the old method, which still sometimes fails.
8176
8177 Fri May 13 01:43:18 1994  Jason Merrill  (jason@deneb.cygnus.com)
8178
8179         * parse.y (initdcl): Call cplus_decl_attributes on the right
8180         variable.
8181         * decl2.c (cplus_decl_attributes): Don't call decl_attributes for
8182         void_type_node.
8183
8184         * typeck.c (build_binary_op_nodefault): Change result_type for
8185         comparison ops to bool.
8186         (build_binary_op): Convert args of && and || to bool.
8187         * cvt.c (build_default_binary_type_conversion): Convert args of &&
8188         and || to bool.
8189         (build_default_unary_type_conversion): Convert arg of ! to bool.
8190         (type_promotes_to): bool promotes to int.
8191
8192 Fri May 13 01:43:18 1994  Mike Stump  <mrs@cygnus.com>
8193
8194         Implement the new builtin `bool' type.
8195         * typeck.c (build_binary_op_nodefault): Convert args of && and || to
8196         bool.
8197         (build_unary_op): Convert arg of ! to bool.
8198         * parse.y: Know true and false.  Use bool_truthvalue_conversion.
8199         * method.c (build_overload_value): Know bool.
8200         (build_overload_name): Ditto.
8201         * lex.c (init_lex): Set up RID_BOOL.
8202         * gxx.gperf: Add bool, true, false.
8203         * error.c (*): Know bool.
8204         * decl.c (init_decl_processing): Set up bool, true, false.
8205         * cvt.c (cp_convert): Handle conversion to bool.
8206         (build_type_conversion): Ditto.
8207         * *.c: Accept bool where integers and enums are accepted (use
8208         INTEGRAL_CODE_P macro).
8209
8210 Thu May 12 19:13:54 1994  Richard Earnshaw  (rwe11@cl.cam.ac.uk)
8211
8212         * g++.c: Use #ifdef for __MSDOS__, not #if.
8213
8214 Thu May 12 18:05:18 1994  Mike Stump  <mrs@cygnus.com>
8215
8216         * decl2.c (lang_f_options): Handle -fshort-temps.  -fshort-temps
8217         gives old behavior , and destroys temporaries earlier.  Default
8218         behavior now conforms to the ANSI working paper.
8219
8220 Thu May 12 14:45:35 1994  Jason Merrill  (jason@deneb.cygnus.com)
8221
8222         * typeck.c (build_modify_expr): Understand MODIFY_EXPR as an lvalue.
8223         Use convert_force to convert the result of a recursive call when we
8224         are dealing with a NOP_EXPR.  Don't automatically wrap MODIFY_EXPRs
8225         in COMPOUND_EXPRs any more.
8226         (various): Lose pedantic_lvalue_warning.
8227         (unary_complex_lvalue): Understand MODIFY_EXPR.
8228
8229         * cvt.c (convert_to_reference): Allow DECL to be error_mark_node if
8230         we don't know what we're initializing.
8231
8232 Wed May 11 01:59:36 1994  Jason Merrill  (jason@deneb.cygnus.com)
8233
8234         * cvt.c (convert_to_reference): Modify to use convtype parameter.
8235         Only create temporaries when initializing a reference, not when
8236         casting.
8237         (cp_convert): New main function.
8238         (convert): Call cp_convert.
8239         * cvt.c, decl.c, typeck.c: Fix calls to convert_to_reference.
8240         * cp-tree.h (CONV_*): New constants used by conversion code for
8241         selecting conversions to perform.
8242
8243         * tree.c (lvalue_p): MODIFY_EXPRs are no longer lvalues.
8244
8245         * typeck.c (build_{static,reinterpret,const_cast): Stubs that just
8246         call build_c_cast.
8247         * parse.y: Add {static,reinterpret,const}_cast.
8248         * gxx.gperf: Ditto.
8249
8250         * typeck.c (common_type): Allow methods with basetypes of different
8251         UPTs.
8252         (comptypes): Deal with UPTs.
8253         (build_modify_expr): Wrap all MODIFY_EXPRs in a COMPOUND_EXPR.
8254
8255         * pt.c (end_template_decl): Check for multiple definitions of member
8256         templates.
8257
8258         * call.c (build_method_call): Complain about calling an abstract
8259         virtual from a constructor.
8260
8261         * typeck.c (pointer_int_sum): Check for the integer operand being 0
8262         after checking the validity of the pointer operand.
8263
8264         * typeck2.c (digest_init): Pedwarn about string initializer being
8265         too long.
8266
8267 Tue May 10 12:10:28 1994  Jason Merrill  (jason@deneb.cygnus.com)
8268
8269         * decl.c (push_overloaded_decl): Only throw away a builtin if the
8270         decl in question is the artificial one.
8271
8272         * parse.y (simple_stmt, switch): Use implicitly_scoped_stmt because
8273         expand_{start,end}_case cannot happen in the middle of a block.
8274
8275         * cvt.c (build_type_conversion_1): Use convert again.
8276
8277 Tue May 10 11:52:04 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
8278
8279         * typeck2.c (digest_init): Make sure we check for signed and
8280         unsigned chars as well when warning about string initializers.
8281
8282         * init.c (emit_base_init): Check if there's a DECL_NAME on the
8283         member before trying to do an initialization for it.
8284
8285 Tue May 10 11:34:37 1994  Mike Stump  <mrs@cygnus.com>
8286
8287         * except.c: Don't do anything useful when cross compiling.
8288
8289 Tue May 10 03:04:13 1994  Jason Merrill  (jason@deneb.cygnus.com)
8290
8291         * decl.c (duplicate_decls): Fix up handling of builtins yet again.
8292         (push_overloaded_decl): Ditto.
8293
8294         * cvt.c (convert): Don't look for void type conversion.
8295
8296 Mon May  9 18:05:41 1994  Jason Merrill  (jason@deneb.cygnus.com)
8297
8298         * init.c (do_friend): Only do a pushdecl for friends, not
8299         pushdecl_top_level.
8300
8301 Mon May  9 13:36:34 1994  Jim Wilson  (wilson@sphagnum.cygnus.com)
8302
8303         * decl.c (lookup_name_current_level): Put empty statement after
8304         the label OUT to make the code valid C.
8305
8306 Mon May  9 12:20:57 1994  Jason Merrill  (jason@deneb.cygnus.com)
8307
8308         * typeck.c (build_binary_op_nodefault): Only complain about
8309         comparing void * and a function pointer if void * is smaller.
8310
8311 Sun May  8 01:29:13 1994  Jason Merrill  (jason@deneb.cygnus.com)
8312
8313         * decl.c (lookup_name_current_level): Move through temporary binding
8314         levels.
8315
8316         * parse.y (already_scoped_stmt): Revive.
8317         (simple_stmt): Use it again.
8318
8319         * decl.c (poplevel): Always call poplevel recursively if we're
8320         dealing with a temporary binding level.
8321
8322 Sat May  7 10:52:28 1994  Mike Stump  <mrs@cygnus.com>
8323
8324         * decl.c (finish_decl): Make sure we run cleanups for initial values
8325         of decls.  Cures memory leak.
8326         * decl.c (expand_static_init): Ditto for static variables.
8327         * decl2.c (finish_file): Ditto for globals.
8328
8329 Sat May  7 03:57:44 1994  Jason Merrill  (jason@deneb.cygnus.com)
8330
8331         * typeck.c (commonparms): Don't complain about redefining default
8332         args.
8333
8334         * decl.c (duplicate_decls): Don't complain twice about conflicting
8335         function decls.
8336         (decls_match): Don't look at default args.
8337         (redeclaration_error_message): Complain about redefining default
8338         args.
8339
8340         * call.c (build_overload_call_real): Also deal with guiding
8341         declarations coming BEFORE the template decl.
8342
8343         * pt.c (unify): Allow different parms to have different
8344         cv-qualifiers.
8345         (unify): Allow trivial conversions on non-template parms.
8346
8347 Fri May  6 03:53:23 1994  Jason Merrill  (jason@deneb.cygnus.com)
8348
8349         * pt.c (tsubst): Support OFFSET_TYPEs.
8350         (unify): Ditto.
8351
8352         * decl2.c (finish_decl_parsing): Call push_nested_class with a type.
8353
8354         * init.c (build_offset_ref): Fix error message.
8355         * search.c (lookup_field): Ditto.
8356
8357         * call.c (build_scoped_method_call): Pass binfo to
8358         build_method_call.
8359         * typeck.c (build_object_ref): Ditto.
8360
8361         * typeck2.c (binfo_or_else): Don't return a _TYPE.
8362
8363         * class.c (finish_struct): Don't complain about re-use of inherited
8364         names or shadowing of type decls.
8365         * decl.c (pushdecl_class_level): Ditto.
8366
8367         * decl.c (finish_enum): Set the type of all the enums.
8368
8369         * class.c (finish_struct): Don't get confused by access decls.
8370
8371         * cp-tree.h (TYPE_MAIN_DECL): New macro to get the _DECL for a
8372         _TYPE.  You can stop using TYPE_NAME for that now.
8373
8374         * parse.y: Lose doing_explicit (check $0 instead).
8375         * gxx.gperf: 'template' now has a RID.
8376         * lex.h (rid): Ditto.
8377         * lex.c (init_lex): Set up the RID for 'template'.
8378
8379         * parse.y (type_specifier_seq): typed_typespecs or
8380         nonempty_type_quals.  Use it.
8381         (handler_args): Fix bogus syntax.
8382         (raise_identifier{,s}, optional_identifier): Lose.
8383         * except.c (expand_start_catch_block): Use grokdeclarator to parse
8384         the catch variable.
8385         (init_exception_processing): The second argument to
8386         __throw_type_match is ptr_type_node.
8387
8388         Fri May  6 07:18:54 1994  Chip Salzenberg  (chip@fin)
8389
8390         [ change propagated from c-decl.c of snapshot 940429 ]
8391         * cp/decl.c (finish_decl): Setting asmspec_tree should not
8392         zero out the old RTL.
8393
8394 Fri May  6 01:25:38 1994  Mike Stump  <mrs@cygnus.com>
8395
8396         Add alpha exception handling support to the compiler.
8397         Quick and dirty backend in except.c.
8398
8399         * cp/*:  Remove most remnants of old exception handling support.
8400         * decl.c (finish_function): Call expand_exception_blocks to put
8401         the exception hanlding blocks at the end of the function.
8402         * dec.c (hack_incomplete_structures): Make sure expand_decl_cleanup
8403         comes after expand_decl_init.
8404         * except.c: Reimplementation.
8405         * expr.c (cplus_expand_expr): Handle THROW_EXPRs.
8406         * lex.c (init_lex): Always have catch, try and throw be reserved
8407         words, so that we may always parse exception handling.
8408         * parse.y: Cleanup to support new interface into exception handling.
8409         * tree.def (THROW_EXPR): Add.
8410
8411 Thu May  5 17:35:37 1994  Jason Merrill  (jason@deneb.cygnus.com)
8412
8413         * parse.y (simple_stmt, for loops): Use implicitly_scoped_stmt.
8414         (various): Lose .kindof_pushlevel and partially_scoped_stmt.
8415
8416 Thu May  5 16:17:27 1994  Kung Hsu  (kung@mexican.cygnus.com)
8417
8418         * parse.y (already_scoped_stmt): move expand_end_binding() to
8419         fix the unmatched LBB/LBE in stabs.
8420
8421 Thu May  5 14:36:17 1994  Jason Merrill  (jason@deneb.cygnus.com)
8422
8423         * decl.c (set_nested_typename): Set TREE_MANGLED on the new
8424         identifiers.
8425         (pushdecl): Check TREE_MANGLED.
8426         (xref_tag): Ditto.
8427         * cp-tree.h (TREE_MANGLED): This identifier is a
8428         DECL_NESTED_TYPENAME (named to allow for future use to denote
8429         mangled function names as well).
8430
8431         Implement inconsistency checking specified in [class.scope0].
8432         * decl.c (lookup_name_real): Don't set ICV here after all.
8433         (finish_enum): Also set the type of the enumerators themselves.
8434         (build_enumerator): Put the CONST_DECL in the list instead of its
8435         initial value.
8436         (pushdecl_class_level): Check inconsistent use of a name in the
8437         class body.
8438         * class.c (finish_struct): Check inconsistent use of a name in the
8439         class body.  Don't set DECL_CONTEXT on types here anymore.
8440         * parse.y (qualified_type_name): Note that the identifier has now
8441         been used (as a type) in the class body.
8442         * lex.c (do_identifier): Note that the identifier has now been used
8443         (as a constant) in the class body.
8444         * error.c (dump_decl): Print type and enum decls better.
8445
8446 Thu May  5 09:35:35 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
8447
8448         * typeck.c (build_modify_expr): Warn about assignment to `this'.
8449
8450 Wed May  4 15:55:49 1994  Jason Merrill  (jason@deneb.cygnus.com)
8451
8452         * init.c (build_delete): Use the global operator delete when
8453         requested.
8454
8455         * decl.c (lookup_name_real): If we find the type we're looking in a
8456         base class while defining a class, set IDENTIFIER_CLASS_VALUE for
8457         the type.
8458
8459         * class.c (finish_struct): Remove a couple of dependencies on
8460         language linkage.
8461
8462         * decl.c (pushtag): Classes do nest in extern "C" blocks.
8463         (pushdecl): Only set DECL_NESTED_TYPENAME on the canonical one for
8464         the type.
8465         (pushtag): Remove another dependency on the language linkage.
8466
8467         * lex.c (cons_up_default_function): Don't set DECL_CLASS_CONTEXT to
8468         a const-qualified type.
8469
8470         * decl.c (push_overloaded_decl): Throw away built-in decls here.
8471         (duplicate_decls): Instead of here.
8472
8473 Wed May  4 15:27:40 1994  Per Bothner  (bothner@kalessin.cygnus.com)
8474
8475         * typeck.c (get_member_function_from_ptrfunc):  Do The Right
8476         Thing (I hope) if we're using thunks.
8477
8478 Wed May  4 13:52:38 1994  Jason Merrill  (jason@deneb.cygnus.com)
8479
8480         * parse.y (specialization): aggr template_type_name ';'.
8481         (named_class_head_sans_basetype): Use it.
8482         (explicit_instantiation): Ditto.
8483         (tmpl.2): Revert.
8484
8485         * cvt.c (build_type_conversion_1): Use convert_for_initialization,
8486         rather than convert, to do conversions after the UDC.
8487
8488         * cp-tree.h (SHARED_MEMBER_P): This member is shared between all
8489         instances of the class.
8490
8491         * search.c (lookup_field): If the entity found by two routes is the
8492         same, it's not ambiguous.
8493
8494 Wed May  4 12:10:00 1994  Per Bothner  (bothner@kalessin.cygnus.com)
8495
8496         * decl.c (lookup_name_real):  Check for a NULL TREE_VALUE,
8497         to prevent the compiler from crashing ...
8498
8499 Wed May  4 11:19:45 1994  Jason Merrill  (jason@deneb.cygnus.com)
8500
8501         * call.c (build_method_call): If we don't have an object, check
8502         basetype_path to figure out where to look up the function.
8503
8504         * typeck.c (convert_for_initialization): Pass TYPE_BINFO (type) to
8505         build_method_call in case exp is NULL_TREE.
8506
8507 Tue May  3 16:02:53 1994  Per Bothner  (bothner@kalessin.cygnus.com)
8508
8509         Give a vtable entries a unique named type, for the sake of gdb.
8510         * class.c (build_vtable_entry):  The addres of a thunk now has
8511         type vtable_entry_type, not ptr_type_node.
8512         * method.c (make_thunk):  Fix type of THUNK_DECL.
8513         * class.c (add_virtual_function, override_one_vtable):  Use
8514         vfunc_ptr_type_node, instead of ptr_type_node.
8515         * cp-tree.h (vfunc_ptr_type_node):  New macro.
8516         * decl.c (init_decl_processing):  Make vtable_entry_type
8517         be a unique type of pointer to a unique function type.
8518
8519 Tue May  3 09:20:44 1994  Jason Merrill  (jason@deneb.cygnus.com)
8520
8521         * parse.y (do_explicit): Sets doing_explicit to 1.
8522         (explicit_instantiation): Use do_explicit rather than TEMPLATE
8523         directly, add "do_explicit error" rule.
8524         (datadef): Set doing_explicit to 0 after an explicit instantiation.
8525         (tmpl.2): Don't instantiate if we see a ';' unless we're doing an
8526         explicit instantiation.
8527         (named_class_head_sans_basetype): Remove aggr template_type_name
8528         ';' again.
8529
8530 Mon May  2 23:17:21 1994  Jason Merrill  (jason@deneb.cygnus.com)
8531
8532         * search.c (lookup_nested_tag): Lose.
8533
8534         * decl2.c (grokfield): Set DECL_CONTEXT on TYPE_DECLs.
8535         (lookup_name_nonclass): Lose.
8536
8537         * decl.c (poplevel_class): Add force parameter.
8538         (lookup_name_real): Fix handling of explicit scoping which specifies
8539         a class currently being defined.  Add 'nonclass' argument.
8540         (lookup_name, lookup_name_nonclass): Shells for lookup_name_real.
8541
8542         * class.c (finish_struct): Don't unset IDENTIFIER_CLASS_VALUEs here.
8543         (popclass): Force clearing of IDENTIFIER_CLASS_VALUEs if we're being
8544         called from finish_struct.
8545
8546 Mon May  2 19:06:21 1994  Per Bothner  (bothner@kalessin.cygnus.com)
8547
8548         * decl.c (init_decl_processing), cp-tree.h:  Removed memptr_type.
8549         (It seeems redundant, given build_ptrmemfunc_type.)
8550         * typeck.c (get_member_function_from_ptrfunc), gc.c (build_headof,
8551         build_classof):  Use vtable_entry_type instead of memptr_type.
8552         * method.c (emit_thunk):  Call poplevel with functionbody==0
8553         to prevent DECL_INITIAL being set to a BLOCK.
8554
8555 Mon May  2 15:02:11 1994  Jason Merrill  (jason@deneb.cygnus.com)
8556
8557         * parse.y (named_class_head_sans_basetype): Add "aggr
8558         template_type_name ';'" rule for forward declaration of
8559         specializations.
8560
8561 Mon May  2 15:02:11 1994  Jason Merrill  (jason@deneb.cygnus.com)
8562
8563         * class.c (instantiate_type): Deal with pmf's.
8564
8565         * Make-lang.in (cc1plus): Don't depend on OBJS or BC_OBJS, since
8566         stamp-objlist does.
8567
8568         * Makefile.in (../cc1plus): Depend on OBJDEPS.
8569         (OBJDEPS): Dependency version of OBJS.
8570
8571 Mon May  2 12:51:31 1994  Kung Hsu  (kung@mexican.cygnus.com)
8572
8573         * search.c (dfs_debug_mark): unmark TYPE_DECL_SUPPRESS_DEBUG, not
8574         DECL_IGNORED_P.
8575
8576 Fri Apr 29 12:29:56 1994  Jason Merrill  (jason@deneb.cygnus.com)
8577
8578         * class.c (finish_struct): Clear out memory of local tags.  And
8579         typedefs.
8580
8581         * decl2.c (grokclassfn): Don't set DECL_CONTEXT to a cv-qualified
8582         type.
8583         * search.c (get_matching_virtual): Be more helpful in error message.
8584
8585         * *: Use DECL_ARTIFICIAL (renamed from DECL_SYNTHESIZED).
8586
8587         * lex.c (default_assign_ref_body): Expect TYPE_NESTED_NAME to work.
8588         (default_copy_constructor_body): Ditto.
8589
8590         * class.c (finish_struct): Don't gratuitously create multiple decls
8591         for nested classes.
8592
8593 Thu Apr 28 23:39:38 1994  Jason Merrill  (jason@deneb.cygnus.com)
8594
8595         Avoid clobbering the arg types of other functions when reverting
8596         static member functions.
8597         * decl.c (revert_static_member_fn): Rearrange arguments, don't
8598         require values for 'fn' and 'argtypes', add warning to comment
8599         above.
8600         (decls_match): Rearrange arguments in call to rsmf.
8601         (grok_op_properties): Don't pass values for fn and argtypes.
8602         * pt.c (instantiate_template): Don't pass values for fn and argtypes.
8603
8604 Thu Apr 28 16:29:11 1994  Doug Evans  (dje@canuck.cygnus.com)
8605
8606         * Make-lang.in (cc1plus): Depend on stamp-objlist.
8607         * Makefile.in (BC_OBJS): Delete.
8608         (OBJS): Cat ../stamp-objlist to get language independent files.
8609         Include ../c-common.o.
8610         (../cc1plus): Delete reference to BC_OBJS.
8611
8612 Thu Apr 28 02:12:08 1994  Jason Merrill  (jason@deneb.cygnus.com)
8613
8614         * search.c (compute_access): No really, deal with static members
8615         properly.  Would I lie to you?
8616
8617         Implement lexical hiding of function declarations.
8618         * pt.c (tsubst): Use lookup_name to look for function decls to guide
8619         instantiation.
8620         * method.c (build_opfncall): Use lookup_name_nonclass to look for
8621         non-member functions.
8622         * init.c (do_friend): Use lookup_name_nonclass to look for
8623         functions.
8624         * error.c (ident_fndecl): Use lookup_name to look for functions.
8625         * decl2.c (lookup_name_nonclass): New function, skips over
8626         CLASS_VALUE.
8627         * decl.c (struct binding_level): Lose overloads_shadowed field.
8628         (poplevel): Don't deal with overloads_shadowed.
8629         (push_overloaded_decl): Do lexical hiding for functions.
8630         * class.c (instantiate_type): Don't check non-members if we have
8631         members with the same name.
8632         * call.c (build_method_call): Use lookup_name_nonclass instead of
8633         IDENTIFIER_GLOBAL_VALUE to check for non-member functions.
8634         (build_overload_call_real): Ditto.
8635
8636         * decl.c (duplicate_decls): Check for ambiguous overloads here.
8637         (push_overloaded_decl): Instead of here.
8638         
8639         * decl.c (pushdecl): Back out Chip's last change.
8640
8641         * decl.c (grok_op_properties): operators cannot be static members.
8642
8643         * cp-tree.h (DECL_SYNTHESIZED): DECL_SOURCE_LINE == 0
8644         (SET_DECL_SYNTHESIZED): DECL_SOURCE_LINE = 0
8645         * lex.c (cons_up_default_function): Use SET_DECL_SYNTHESIZED.
8646
8647         * method.c (do_inline_function_hair): Don't put friends of local
8648         classes into global scope, either.
8649
8650         * typeck2.c (build_functional_cast): Don't look for a function call
8651         interpretation.
8652
8653 Thu Apr 28 15:19:46 1994  Mike Stump  <mrs@cygnus.com>
8654
8655         * cp-tree.h: disable use of backend EH.
8656
8657 Wed Apr 27 21:01:24 1994  Doug Evans  (dje@canuck.cygnus.com)
8658
8659         * Make-lang.in (c++.distdir): mkdir tmp/cp first.
8660         * Makefile.in (INCLUDES): Move definition to same place as
8661         parent makefile.
8662         (ALLOCA): Define.
8663         (OLDAR_FLAGS): Delete.
8664         (OLDCC): Define.
8665         (DIR): Delete.
8666         (CLIB): Define.
8667         (####site): Delete.
8668         (SUBDIR_USE_ALLOCA): Don't use ALLOCA if compiling with gcc.
8669
8670 Wed Apr 27 19:10:04 1994  Kung Hsu  (kung@mexican.cygnus.com)
8671
8672         * decl.c (xref_tag): not to use strstr(), it's not available on
8673         all platforms.
8674
8675 Wed Apr 27 18:10:12 1994  Jason Merrill  (jason@deneb.cygnus.com)
8676
8677         * class.c (finish_struct): Resolve yet another class/pmf confusion.
8678
8679         * call.c (build_overload_call_real): Don't take the single-function
8680         shortcut if we're dealing with an overloaded operator.
8681
8682 Wed Apr 27 17:35:37 1994  Mike Stump  <mrs@cygnus.com>
8683
8684         * search.c (get_base_distance): Search the virtual base class
8685         binfos, incase someone wants to convert to a real virtual base
8686         class.
8687         * search.c (expand_indirect_vtbls_init): Use convert_pointer_to_real
8688         instead of convert_pointer_to, as it now will work.
8689
8690 Wed Apr 27 15:36:49 1994  Jason Merrill  (jason@deneb.cygnus.com)
8691
8692         * cvt.c (convert_to_reference): Don't complain about casting away
8693         const and volatile.
8694
8695         * typeck.c (build_unary_op): References are too lvalues.
8696
8697 Wed Apr 27 13:58:05 1994  Mike Stump  <mrs@cygnus.com>
8698
8699         * class.c (override_one_vtable): We have to prepare_fresh_vtable
8700         before we modify it, not after, also, we cannot reuse an old vtable,
8701         once we commit to a new vtable.  Implement ambiguous overrides in
8702         virtual bases as abstract.  Hack until we make the class
8703         ill-formed.
8704
8705 Wed Apr 27 01:17:08 1994  Jason Merrill  (jason@deneb.cygnus.com)
8706
8707         * parse.y (unary_expr): Expand new_placement[opt] and
8708         new_initializer[opt] inline.
8709
8710         * search.c (lookup_fnfields): Don't throw away the inheritance
8711         information here, either.
8712         (compute_access): Handle static members properly.
8713
8714         * init.c (build_member_call): Always set basetype_path, and pass it
8715         to lookup_fnfields.
8716
8717         * search.c (lookup_field): Deal properly with the case where
8718         xbasetype is a chain of binfos; don't throw away the inheritance
8719         information.
8720         (compute_access): protected_ok always starts out at 0.
8721
8722         * init.c (resolve_offset_ref): Don't cast `this' to the base type
8723         until we've got our basetype_path.
8724
8725         * cp-tree.h (IS_OVERLOAD_TYPE): aggregate or enum.
8726
8727         * cvt.c (build_up_reference): Use build_pointer_type rather than
8728         TYPE_POINTER_TO.
8729
8730         * call.c (convert_harshness_ansi): Call type_promotes_to for reals
8731         as well.
8732
8733         * cvt.c (type_promotes_to): Retain const and volatile, add
8734         float->double promotion.
8735
8736         * decl.c (grokdeclarator): Don't bash references to arrays into
8737         references to pointers in function parms.  Use type_promotes_to.
8738
8739 Tue Apr 26 23:44:36 1994  Mike Stump  <mrs@cygnus.com>
8740
8741         Finish off Apr 19th work.
8742
8743         * class.c (finish_struct_bits): Rename has_abstract_virtuals to
8744         might_have_abstract_virtuals.
8745         * class.c (strictly_overrides, override_one_vtable,
8746         merge_overrides): New routines to handle virtual base overrides.
8747         * class.c (finish_struct): Call merge_overrides to handle overrides
8748         in virtual bases.
8749
8750 Tue Apr 26 12:45:53 1994  Jason Merrill  (jason@deneb.cygnus.com)
8751
8752         * typeck.c (build_function_call): Call build_function_call_real with
8753         LOOKUP_NORMAL.
8754
8755         * *: Don't deal with TYPE_EXPRs.
8756
8757         * tree.c (lvalue_p): If the type of the expression is a reference,
8758         it's an lvalue.
8759
8760         * cvt.c (convert_to_reference): Complain about passing const
8761         lvalues to non-const references.
8762         (convert_from_reference): Don't arbitrarily throw away const and
8763         volatile on the target type.
8764
8765         * parse.y: Simplify and fix rules for `new'.
8766
8767         * decl.c (grok_op_properties): operator void is illegal.
8768
8769 Mon Apr 25 02:36:28 1994  Jason Merrill  (jason@deneb.cygnus.com)
8770
8771         * parse.y (components): Anonymous bitfields can still have declspecs.
8772
8773         * decl.c (pushdecl): Postpone handling of function templates like we
8774         do C functions.
8775
8776         * search.c (expand_indirect_vtbls_init): Fix infinite loop when
8777         convert_pointer_to fails.
8778
8779         * call.c (compute_conversion_costs_ansi): A user-defined conversion
8780         by itself is better than that UDC followed by standard conversions.
8781         Don't treat integers and reals specially.
8782
8783         * cp-tree.h: Declare flag_ansi.
8784
8785         * typeck.c (c_expand_return): pedwarn on return in void function
8786         even if the expression is of type void.
8787         (build_c_cast): Don't do as much checking for casts to void.
8788         (build_modify_expr): pedwarn about array assignment if this code
8789         wasn't generated by the compiler.
8790
8791         * tree.c (lvalue_p): A comma expression is an lvalue if its second
8792         operand is.
8793
8794         * typeck.c (default_conversion): Move code for promoting enums and
8795         ints from here.
8796         * cvt.c (type_promotes_to): To here.
8797         * call.c (convert_harshness_ansi): Use type_promotes_to.  Also fix
8798         promotion semantics for reals.
8799
8800 Sun Apr 24 16:52:51 1994  Doug Evans  (dje@canuck.cygnus.com)
8801
8802         * Make-lang.in (c++.install-common): Check for g++-cross.
8803         * Makefile.in: Remove Cygnus cruft.
8804         (config.status): Delete.
8805         (RTL_H): Define.
8806         (TREE_H): Use complete pathname, some native makes have minimal
8807         VPATH support.
8808         (*.o): Use complete pathname to headers in parent dir.
8809         (doc, info, dvi): Delete.
8810
8811 Sun Apr 24 16:52:51 1994  Doug Evans  (dje@canuck.cygnus.com)
8812
8813         * Make-lang.in (c++.install-common): Check for g++-cross.
8814         * Makefile.in: Remove Cygnus cruft.
8815         (config.status): Delete.
8816         (RTL_H): Define.
8817         (TREE_H): Use complete pathname, some native makes have minimal
8818         VPATH support.
8819         (*.o): Use complete pathname to headers in parent dir.
8820         (doc, info, dvi): Delete.
8821
8822 Sun Apr 24 00:47:49 1994  Jason Merrill  (jason@deneb.cygnus.com)
8823
8824         * decl.c (pushdecl): Avoid redundant warning on redeclaring function
8825         with different return type.
8826         (decls_match): Compare return types strictly.
8827
8828 Fri Apr 22 12:55:42 1994  Jason Merrill  (jason@deneb.cygnus.com)
8829
8830         * cvt.c (build_type_conversion): Do try to convert through other
8831         pointers.  This will fail if the class defines multiple pointer
8832         conversions.
8833
8834         * error.c (dump_type_prefix): Print out pointers to arrays properly.
8835         (dump_type_suffix): Ditto.  (was 'int *[]', now 'int (*)[]')
8836
8837         * typeck.c (build_unary_op): Disallow ++/-- on pointers to
8838         incomplete type.
8839
8840         * decl.c (duplicate_decls): Check mismatched TREE_CODES after
8841         checking for shadowing a builtin.  If we're redeclaring a builtin
8842         function, bash the old decl to avoid an ambiguous overload.
8843
8844         * cvt.c (convert_to_reference): Don't force arrays to decay here.
8845
8846         * tree.c (lvalue_p): A MODIFY_EXPR is an lvalue.
8847
8848         * decl.c (duplicate_decls): Don't assume that the decls will have
8849         types.
8850
8851         Mon Apr 18 11:35:32 1994  Chip Salzenberg  (chip@fin.uucp)
8852
8853         [ cp/* changes propagated from c-* changes in 940318 snapshot ]
8854         * c-decl.c (pushdecl): Warn if type mismatch with another external decl
8855         in a global scope.
8856
8857         Fri Apr 22 06:38:56 1994  Chip Salzenberg  (chip@fin.uucp)
8858
8859         * cp/typeck2.c (signature_error): Use cp_error for "%T".
8860
8861         Mon Apr 18 11:59:59 1994  Chip Salzenberg  (chip@fin.uucp)
8862
8863         [ cp/* changes propagated from c-* changes in 940415 snapshot ]
8864         * cp/decl.c (duplicate_decls, pushdecl, builtin_function):
8865         Use DECL_FUNCTION_CODE instead of DECL_SET_FUNCTION_CODE.
8866
8867         Mon Apr 18 11:55:18 1994  Chip Salzenberg  (chip@fin.uucp)
8868
8869         [ cp/* changes propagated from c-* changes in 940409 snapshot ]
8870         * cp/decl.c (duplicate_decls): Put new type in same obstack as
8871         old ones, or permanent if old ones in different obstacks.
8872
8873         Mon Apr 18 11:48:49 1994  Chip Salzenberg  (chip@fin.uucp)
8874
8875         [ cp/* changes propagated from c-* changes in 940401 snapshot ]
8876         * cp/parse.y (attrib): Handle string args as expressions,
8877         merging the two rules.  `mode' attribute now takes a string arg.
8878         Delete the rule for an identifier as arg.
8879
8880         Mon Apr 18 11:24:00 1994  Chip Salzenberg  (chip@fin.uucp)
8881
8882         [ cp/* changes propagated from c-* changes in 940312 snapshot ]
8883         * cp/typeck.c (pointer_int_sum): Multiplication should be done signed.
8884         (pointer_diff): Likewise the division.
8885
8886         Sun Mar  6 19:43:39 1994  Chip Salzenberg  (chip@fin.uucp)
8887
8888         [ cp/* changes propagated from c-* changes in 940304 snapshot ]
8889         * cp/decl.c (finish_decl): Issue warning for large objects,
8890         if requested.
8891
8892         Sat Feb 19 22:20:32 1994  Chip Salzenberg  (chip@fin.uucp)
8893
8894         [ cp/* changes propagated from c-* changes in 940218 snapshot ]
8895         * cp/parse.y (attrib): Handle attribute ((section ("string"))).
8896         * cp/decl.c (duplicate_decls): Merge section name into new decl.
8897
8898         Tue Feb  8 09:49:17 1994  Chip Salzenberg  (chip@fin.uucp)
8899
8900         [ cp/* changes propagated from c-* changes in 940206 snapshot ]
8901         * cp/typeck.c (signed_or_unsigned_type): Check for any
8902         INTEGRAL_TYPE_P not just INTEGER_TYPE.
8903
8904         Mon Dec  6 13:35:31 1993  Norbert Kiesel  (norbert@i3.INformatik.rwth-aachen.DE)
8905
8906         * cp/decl.c (finish_enum): Start from 0 when determining precision
8907         for short enums.
8908
8909         Fri Dec  3 17:07:58 1993  Ralph Campbell  (ralphc@pyramid.COM)
8910
8911         * cp/parse.y (unary_expr): Look at $1 for tree_code rather than
8912         casting $$.
8913
8914         Wed Nov 17 19:22:09 1993  Chip Salzenberg  (chip@fin.uucp)
8915
8916         * cp/typeck.c (build_binary_op_nodefault): Propagate code
8917         from C front-end to optimize unsigned short division.
8918         (build_conditional_expr): Fix bug in "1 ? 42 : (void *) 8".
8919
8920         Wed Nov 17 19:17:18 1993  Chip Salzenberg  (chip@fin.uucp)
8921
8922         * cp/call.c (convert_harshness_ansi): Given an (e.g.) char
8923         constant, prefer 'const char &' to 'int'.
8924
8925         Wed Feb  3 13:11:48 1993  Chip Salzenberg  (chip@fin.uucp)
8926
8927         * cp/class.c (finish_struct_methods):  Handle multiple
8928         constructors in fn_fields list.
8929
8930 Fri Apr 22 12:48:10 1994  Kung Hsu  (kung@mexican.cygnus.com)
8931
8932         * class.c (finish_struct): use TYPE_DECL_SUPPRESS_DEBUG to flag
8933         types not to be dumped in stabs, like types in #pragma interface.
8934         * decl.c (init_decl_processing): use TYPE_DECL_SUPPRESS_DEBUG to
8935         mark unknown type.
8936
8937 Fri Apr 22 03:27:26 1994  Doug Evans  (dje@cygnus.com)
8938
8939         * Language directory reorganization.
8940         See parent makefile.
8941
8942 Thu Apr 21 18:27:57 1994  Per Bothner  (bothner@kalessin.cygnus.com)
8943
8944         * cp-tree.h (THUNK_DELTA):  It is normally negative, so
8945         use signed .i variant of frame_size rather than unsigned .u.
8946         * cp-tree.h (VTABLE_NAME_FORMAT):  If flag_vtable_thunks,
8947         use "VT" rather than "vt" due to binary incompatibility.
8948         * class.c (get_vtable_name):  Use strlen of VTABLE_NAME_FORMAT,
8949         rather than sizeof, since it is now an expression.
8950         * class.c (modify_one_vtable):  Modify to skip initial element
8951         containing a count of the vtable.
8952
8953 Thu Apr 21 00:09:02 1994  Jason Merrill  (jason@deneb.cygnus.com)
8954
8955         * lex.c (check_newline): Force interface_unknown on main input file.
8956
8957         * pt.c (do_pending_expansions): Always emit functions that have been
8958         explicitly instantiated.
8959         (do_function_instantiation): Set DECL_EXPLICITLY_INSTANTIATED.
8960         (do_type_instantiation): Set CLASSTYPE_VTABLE_NEEDS_WRITING and
8961         DECL_EXPLICITLY_INSTANTIATED on all my methods.
8962         * parse.y (explicit_instantiation): Call do_type_instantiation for
8963         types.
8964         * decl2.c (finish_vtable_vardecl): Call import_export_vtable.
8965         * decl.c (start_function): Don't set DECL_EXTERNAL on a function
8966         that has been explicitly instantiated.
8967         * cp-tree.h (DECL_EXPLICITLY_INSTANTIATED): Alias for
8968         DECL_LANG_FLAG_4.
8969         * class.c: Move import_export_vtable to decl2.c, and comment out all
8970         uses.
8971
8972 Wed Apr 20 16:51:06 1994  Jason Merrill  (jason@deneb.cygnus.com)
8973
8974         * lex.c (process_next_inline): Don't muck with DECL_INLINE.
8975         (do_pending_inlines): Ditto.
8976
8977 Tue Apr 19 22:25:41 1994  Mike Stump  <mrs@cygnus.com>
8978
8979         Reimplement vtable building, and most vtable pointer setting.
8980         Allows for earier maintenance, easier understandability, and most
8981         importantly, correct semantics.
8982
8983         * class.c (build_vtable): Removed unneeded
8984         SET_BINFO_VTABLE_PATH_MARKED.
8985         * class.c (prepare_fresh_vtable): Ditto.  Added argument.
8986         * class.c (modify_vtable_entry): General cleanup.
8987         * class.c (related_vslot, is_normal, modify_other_vtable_entries,
8988         modify_vtable_entries): Removed.
8989         * class.c (add_virtual_function): General cleanup.
8990         * class.c (finish_base_struct): Setup BINFO_VTABLE and
8991         BINFO_VIRTUALS as early as we can, so that modify_all_vtables can
8992         work.
8993         * class.c (finish_vtbls): New routine, mostly from
8994         unmark_finished_struct.
8995         * class.c (overrides): New routine.
8996         * class.c (modify_one_vtable): New routine, mostly from
8997         modify_other_vtable_entries and modify_vtable_entries.
8998         * class.c (modify_all_direct_vtables, modify_all_indirect_vtables,
8999         modify_all_vtables): New routines.
9000         * class.c (finish_struct): Added arguemnt to prepare_fresh_vtable
9001         call.  General cleanup on how pending_hard_virtuals are handled.
9002         General cleanup on modifying vtables.  Use finish_vtbls, instead of
9003         unmark_finished_struct.
9004         * cp-tree.h (init_vtbl_ptrs, expand_direct_vtbls_init,
9005         get_first_matching_virtual, get_matching_virtual,
9006         expand_vbase_vtables_init,  expand_indirect_vtbls_init): Update.
9007         * cvt.c (convert_pointer_to_real): cleanup error message.
9008         * decl.c (grokfndecl): General cleanup.
9009         * decl.c (finish_function): Change init_vtbl_ptrs call to
9010         expand_direct_vtbls_init.  Change expand_vbase_vtables_init call to
9011         expand_indirect_vtbls_init.
9012         * init.c (expand_virtual_init): Remove unneeded argument.
9013         * init.c (init_vtbl_ptrs): Rename to expand_direct_vtbls_init, added
9014         two arguments to make more general.  Made more general.  Now can be
9015         used for vtable pointer initialization from virtual bases.
9016         * init.c (emit_base_init): Change expand_vbase_vtables_init call to
9017         expand_indirect_vtbls_init.  Change init_vtbl_ptrs call to
9018         expand_direct_vtbls_init.
9019         * init.c (expand_virtual_init): General cleanup.
9020         * init.c (expand_default_init): Change expand_vbase_vtables_init
9021         call to expand_indirect_vtbls_init.
9022         * init.c (expand_recursive_init_1): Change expand_vbase_vtables_init
9023         call to expand_indirect_vtbls_init.
9024         * init.c (expand_recursive_init): Change expand_vbase_vtables_init
9025         call to expand_indirect_vtbls_init.
9026         * search.c (get_first_matching_virtual): Rename to
9027         get_matching_virtual.  General cleanup and remove setting of
9028         DECL_CONTEXT.  That is now done in a cleaner way in
9029         modify_vtable_entry and add_virtual_function.
9030         * search.c (expand_vbase_vtables_init): Rename to
9031         expand_indirect_vtbls_init.  General cleanup.  Use
9032         expand_direct_vtbls_init to do hard work.  Ensures that _all_ vtable
9033         pointers from virtual bases are set up.
9034         * search.c (bfs_unmark_finished_struct, unmark_finished_struct):
9035         Removed.
9036
9037         * *.[chy]: Remove support for VTABLE_USES_MASK.
9038
9039 Tue Apr 19 12:51:59 1994  Jason Merrill  (jason@deneb.cygnus.com)
9040
9041         * cvt.c (convert_to_reference): Use NOP_EXPRs to switch between
9042         reference and pointer types instead of bashing the types directly.
9043
9044         * call.c (build_overload_call_real): Use the TREE_CODE to determine
9045         whether the function is overloaded or not, rather than
9046         TREE_OVERLOADED.
9047         * *: Remove all uses of TREE_OVERLOADED.
9048
9049         * decl.c (grokdeclarator): Only complain about initializing const
9050         fields when -ansi or -pedantic.
9051
9052 Tue Apr 19 12:42:42 1994  Doug Evans  (dje@canuck.cygnus.com)
9053
9054         * cp-tree.h (THUNK_DELTA): frame_size is now a union.
9055
9056 Mon Apr 18 00:17:13 1994  Jason Merrill  (jason@deneb.cygnus.com)
9057
9058         Do overloading on a block-by-block basis, not function-by-function.
9059         * decl.c: Lose overloads_to_forget.
9060         (struct binding_level): Add overloads_shadowed field.
9061         (poplevel): Restore overloads_shadowed.
9062         (push_overloaded_decl): Use overloads_shadowed instead of
9063         overloads_to_forget.
9064         (finish_function): Don't look at overloads_to_forget.
9065
9066         Copy enum_overflow logic from c-decl.c.
9067         * decl.c (start_enum): Initialize enum_overflow.
9068         (build_enumerator): Use enum_overflow.  Also use current_scope().
9069
9070         * search.c (current_scope): Move Brendan's comment from
9071         build_enumerator here.
9072
9073         * typeck.c (convert_for_assignment): Change warnings to pedwarns for
9074         discarding const/volatile.
9075
9076 Sat Apr 16 01:18:21 1994  Jason Merrill  (jason@deneb.cygnus.com)
9077
9078         * typeck.c (comp_target_parms): Accept TEMPLATE_TYPE_PARMs on the rhs.
9079         (comp_target_types): Ditto.
9080
9081         * decl.c (lookup_name): Don't unset got_scope here.
9082
9083         * spew.c (yylex): Only replace yylval with the TYPE_NESTED_NAME if
9084         got_scope != NULL_TREE.
9085
9086 Fri Apr 15 16:36:33 1994  Jason Merrill  (jason@deneb.cygnus.com)
9087
9088         Horrible kludge to prevent templates from being instantiated by
9089         their base classes.
9090         * parse.y (template_instantiate_once): Unset TYPE_BEING_DEFINED
9091         before we get to left_curly.
9092         * pt.c (instantiate_class_template): Set TYPE_BEING_DEFINED.
9093
9094         * error.c (dump_decl): If it's a typedef, print out the name of the
9095         decl, not just the underlying type.
9096
9097         * decl.c (pushdecl): If the old duplicate decl was a TYPE_DECL,
9098         update the IDENTIFIER_TYPE_VALUE of its name.
9099
9100         * decl2.c (finish_file): When processing the initializer for a
9101         static member, pretend that the dummy function is a member of the
9102         same class.
9103
9104 Fri Apr 15 15:56:35 1994  Kung Hsu  (kung@mexican.cygnus.com)
9105
9106         * class.c (build_vtable_entry): revert Apr 4 change.
9107         * decl2.c (mark_vtable_entries): replace pure virtual function
9108         decl with abort's.
9109
9110 Fri Apr 15 13:49:33 1994  Jason Merrill  (jason@deneb.cygnus.com)
9111
9112         * typeck.c (build_conditional_expr): Pedwarn on pointer/integer
9113         mismatch, and don't pedwarn on 0/function pointer mismatch.
9114
9115         * typeck2.c (digest_init): Lose code for special handling of unions.
9116         (process_init_constructor): Since they're handled just fine here.
9117         Pedwarn on excess elements.
9118
9119         * decl2.c (grokfield): Complain about local class method declaration
9120         without definition.
9121
9122 Fri Apr 15 13:19:40 1994  Per Bothner  (bothner@kalessin.cygnus.com)
9123
9124         * method.c (emit_thunk):  Add extern declaration for
9125         current_call_is_indirect (needed for hppa).
9126
9127 Thu Apr 14 16:12:31 1994  Jason Merrill  (jason@deneb.cygnus.com)
9128
9129         Improve local class support; allow classes in different blocks to
9130         have the same name.
9131         * decl.c (pushtag): Support local classes better.
9132         (pushdecl_nonclass_level): New function for pushing mangled decls of
9133         nested types into the appropriate scope.
9134         (xref_defn_tag): Use pushdecl_nonclass_level instead of
9135         pushdecl_top_level. 
9136         (grokfndecl): Don't mess with IDENTIFIER_GLOBAL_VALUE for local
9137         class methods.
9138         * method.c (do_inline_function_hair): Ditto.
9139
9140         * class.c (finish_struct): It is legal for a class with no
9141         constructors to have nonstatic const and reference members.
9142
9143 Thu Apr 14 07:15:11 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
9144
9145         * decl.c (push_overloaded_decl): Avoid giving errors about
9146         built-ins, since duplicate_decls will have given warnings/errors
9147         for them.
9148
9149 Thu Apr 14 03:45:12 1994  Jason Merrill  (jason@deneb.cygnus.com)
9150
9151         * cvt.c (convert_to_reference): Warn about casting pointer type to
9152         reference type when this is probably not what they wanted.
9153
9154 Wed Apr 13 13:12:35 1994  Per Bothner  (bothner@kalessin.cygnus.com)
9155
9156         * decl.c (finish_decl):  Don't mindlessly set TREE_USED for
9157         static consts any more (toplev.c has now been modified to
9158         not emit warnings if they are unused).
9159
9160 Wed Apr 13 00:22:35 1994  Jason Merrill  (jason@deneb.cygnus.com)
9161
9162         * decl.c (grok_op_properties): If op new/delete get here with
9163         METHOD_TYPEs, do a revert_static_member_fn.
9164
9165         * cp-tree.h (IDENTIFIER_CLASS_TYPE_VALUE): Lose.
9166         * init.c (is_aggr_typedef): Don't look at
9167         IDENTIFIER_CLASS_TYPE_VALUE.
9168         (get_aggr_from_typedef): Ditto.
9169         (get_type_value): Ditto.
9170         * call.c (build_scoped_method_call): Don't rely on overloaded
9171         template names having IDENTIFIER_CLASS_VALUE set.
9172
9173         * parse.y (component_decl_1, fn.def2): Revert rules for
9174         constructors.
9175         (component_decl_1, fn.def2): Use $1 instead of $$, since $$ is being
9176         clobbered.
9177
9178         * decl.c (start_function): Only warn about `void main()' if pedantic
9179         || warn_return_type.
9180
9181 Tue Apr 12 02:14:17 1994  Jason Merrill  (jason@deneb.cygnus.com)
9182
9183         Clean up overloading of the template name.
9184         * class.c (pushclass): overload the template name whenever pushing
9185         into the scope of a template class, not just if it is
9186         uninstantiated.
9187         (popclass): Correspondingly.
9188         * search.c (push_class_decls): Don't overload_template_name.
9189         * pt.c (overload_template_name): Don't set IDENTIFIER_LOCAL_VALUE or
9190         DECL_CONTEXT on things.
9191         * parse.y (left_curly): Don't overload_template_name.
9192         * class.c (finish_struct): Don't undo_template_name_overload.
9193
9194         * method.c (build_opfncall): Only pass one argument to global op
9195         delete.
9196
9197         * call.c (build_method_call): Use TYPE_VEC_DELETE_TAKES_SIZE to
9198         decide how many arguments to use for vec delete.
9199
9200         * decl.c (grok_op_properties): Be consistent in modifying
9201         current_class_type.
9202         (grokdeclarator): Only complain about function decls with no return
9203         type if we're being pedantic.
9204
9205 Mon Apr 11 00:10:53 1994  Jason Merrill  (jason@deneb.cygnus.com)
9206
9207         Add support for operator new [] and operator delete [].
9208
9209         * tree.def: Add VEC_NEW_EXPR and VEC_DELETE_EXPR.
9210         * ptree.c (print_lang_type): Indicate vec new/delete.
9211         * parse.y: Support vec new/delete.
9212         * method.c (build_decl_overload): Deal with vec new/delete.
9213         (build_opfncall): Ditto.
9214         * lex.c (init_lex): Set up values of ansi_opname and opname_tab for
9215         vec new/delete.  vec new uses "__vn", and vec delete uses "__vd".
9216         * init.c (init_init_processing): Set up BIVN and BIVD.
9217         (do_friend): Don't clean up after mistaken setting of TREE_GETS_NEW,
9218         since it doesn't happen any more.
9219         (build_new): Support vec new.  Always call something.
9220         (build_x_delete): Support vec delete.
9221         (build_vec_delete): Lose dtor_dummy argument, add use_global_delete,
9222         and pass it to build_x_delete.
9223         * decl2.c (delete_sanity): Don't change behavior by whether or not
9224         the type has a destructor.  Pass use_global_delete to
9225         build_vec_delete.
9226         (coerce_delete_type): Make sure that the type returned has a first
9227         argument of ptr_type_node.
9228         * decl.c (init_decl_processing): Also declare the global vec
9229         new/delete.
9230         (grokdeclarator): Also force vec new/delete to be static.
9231         (grok_op_properties): Note presence of vec new/delete, and play with
9232         their args.  If vec delete takes the optional size_t argument, set
9233         TYPE_VEC_DELETE_TAKES_SIZE.
9234         * cp-tree.h (TYPE_GETS_{REG,VEC}_DELETE): New macros to simplify
9235         checking for one delete or the other.
9236         (lang_type): gets_new and gets_delete are now two bits long.  The
9237         low bit is for the non-array version.  Lose gets_placed_new.
9238         (TYPE_VEC_DELETE_TAKES_SIZE): New macro indicating that the vec
9239         delete defined by this class wants to know how much space it is
9240         deleting.
9241         (TYPE_VEC_NEW_USES_COOKIE): New macro to indicate when vec new must
9242         add a header containing the number of elements in the vector; i.e.
9243         when the elements need to be destroyed or vec delete wants to know
9244         the size.
9245         * class.c (finish_struct_methods): Also check for overloading vec
9246         delete.
9247         * call.c (build_method_call): Also delete second argument for vec
9248         delete.
9249
9250         * decl.c (grokdeclarator): Correct complaints again.
9251         (grokdeclarator): Fix segfault on null declarator.
9252         (decls_match): Also accept redeclaration with no arguments if both
9253         declarations were in C context.  Bash TREE_TYPE (newdecl) here.
9254         (duplicate_decls): Instead of here.
9255
9256         * parse.y (nested_name_specifier_1): Lose rules for dealing with
9257         syntax errors nicely, since they break parsing of 'const i;'.
9258
9259         * decl.c (lookup_name): if (got_scope == current_class_type)
9260         val = IDENTIFIER_CLASS_VALUE (name).
9261
9262         * search.c (lookup_nested_tag): Look in enclosing classes, too.
9263
9264         * spew.c (yylex): Only look one character ahead when checking for a
9265         SCOPE.
9266
9267         * lex.c (check_newline): Read first nonwhite char before
9268         incrementing lineno.
9269
9270         * decl.c (grokdeclarator): Don't claim that typedefs are variables
9271         in warning.
9272
9273         * parse.y: Divide up uses of unqualified_id into
9274         notype_unqualified_id and unqualified_id, so that TYPENAME can be
9275         used as an identifier after an object.
9276
9277         * class.c (push_nested_class): Don't push into non-class scope.
9278
9279         * decl.c (grokdeclarator): If an identifier could be a type
9280         conversion operator, but has no associated type, it's not a type
9281         conversion operator.
9282
9283         * pt.c (unify): Check for equality of constants better.
9284
9285         * decl.c (grokdeclarator): Don't complain about access decls.
9286
9287 Sun Apr 10 02:39:55 1994  Jason Merrill  (jason@deneb.cygnus.com)
9288
9289         * decl.c (grokdeclarator): pedwarn about data definitions without
9290         types here.
9291
9292         * parse.y (datadef): Don't pedwarn about decls without types here,
9293         since that is valid for functions.
9294         (fn.def2, component_decl): Support constructors with declmods again.
9295         (nomods_initdecls): For decls without any mods, so that we don't try
9296         to get declspecs from some arbitrary $0.
9297
9298         * search.c (lookup_field): Use cp_error.
9299
9300         * parse.y (nested_name_specifier_1): Don't check aggr/non-aggr type
9301         here; it breaks destructors for non-aggr types.
9302
9303         * decl.c (lookup_name): Only look for TYPE_DECLs in base classes of
9304         a type being defined, like the comment says.
9305         If got_scope is not an aggregate, just return NULL_TREE.
9306
9307         * pt.c (create_nested_upt): Kung's code for creating types nested
9308         within uninstantiated templates now lives here (it used to live in
9309         hack_more_ids).  It needs to be expanded.
9310
9311         * parse.y: Stop calling see_typename so much.
9312
9313         * decl.c (lookup_name): Deal with TTPs and UPTs.
9314
9315         * lex.c (real_yylex): Don't set looking_for_typename just because we
9316         saw a 'new'.
9317         (dont_see_typename): #if 0 out.
9318
9319         * spew.c (yylex): Increment looking_for_typename if the next
9320         character is SCOPE, rather than setting it to 1; this way, the value
9321         from seeing an aggr specifier will not be lost.  This kinda relies
9322         on looking_for_typename never being < 0, which is now true.
9323
9324         * parse.y (nested_name_specifier_1): Accept TEMPLATE_TYPE_PARMs,
9325         too.
9326         (named_class_head_sans_basetype): Accept template types, too.  Oops.
9327
9328 Fri Apr  8 16:39:35 1994  Jason Merrill  (jason@deneb.cygnus.com)
9329
9330         * decl2.c (reparse_decl_as_expr1): Handle SCOPE_REFs.
9331
9332         * parse.y: Lose START_DECLARATOR.
9333
9334         * search.c (lookup_nested_tag): New function to scan CLASSTYPE_TAGS
9335         for a class.
9336
9337         * parse.y: Simplify fn.def2 and component_decl.  Support 'enum
9338         A::foo' syntax.  Catch invalid scopes better.
9339
9340         * parse.y, lex.c: lose TYPENAME_COLON.
9341
9342         * decl2.c (groktypefield): #if 0 out.
9343
9344         * decl.c (lookup_name): If the type denoted by got_scope is
9345         currently being defined, look in CLASSTYPE_TAGS rather than FIELDS.
9346
9347         * class.c (push_nested_class): Don't try to push into
9348         error_mark_node.
9349
9350 Fri Apr  8 07:26:36 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
9351
9352         * Makefile.in (stamp-parse): Update count of conflicts to 33.
9353
9354 Thu Apr  7 17:47:53 1994  Jason Merrill  (jason@deneb.cygnus.com)
9355
9356         A saner implementation of nested types that treats template types
9357         no differently from non-template types.  There are still some
9358         shortcomings of our system; most notably, it is difficult to look
9359         for a nested type that is hidden by another name, because of the way
9360         we keep track of hidden types.  But this shouldn't be a problem for
9361         just about anyone.  Perhaps lookup_field should be fixed up a bit.
9362
9363         * spew.c: Moved handling of nested types/scoping from the lexer
9364         into the parser.  Removed variable template_type_seen_before_scope.
9365         Removed functions frob_identifier, hack_more_ids, and various cruft
9366         that was #if 0'd out in the past, reducing the size of the file from
9367         1146 lines to 450 lines.  We can't quite do away with spew.c yet,
9368         though; we still need it for do_aggr () and checking for SCOPE after
9369         the current identifier.  And setting lastiddecl.
9370
9371         * parse.y: Moved handling of nested types/scoping from the lexer
9372         into the parser, using a new global variable `got_scope'.  Reduced
9373         the number of states by 53.  Implemented all uses of explicit global
9374         scope.  Removed terminals SCOPED_TYPENAME and SCOPED_NAME.  Removed
9375         nonterminals tmpl.1, scoped_base_class, id_scope, typename_scope,
9376         scoped_typename.  Added nonterminals nested_type,
9377         qualified_type_name, complete_type_name, qualified_id, ptr_to_mem,
9378         nested_name_specifier, global_scope, overqualified_id, type_name.
9379         Changed many others.  Added 9 new reduce/reduce conflicts, which are
9380         nested type parallels of 9 that were already in the grammar for
9381         non-nested types.  Eight of the now 33 conflicts should be removed
9382         in the process of resolving the late binding between variable and
9383         function decls.
9384
9385         * gxxint.texi (Parser): Update.
9386
9387         * cp-tree.h (IS_AGGR_TYPE_CODE): Add UNINSTANTIATED_P_TYPE.
9388
9389         * lex.h: Add decl for got_scope.
9390
9391         * lex.c (see_typename): Claim to be the lexer when calling
9392         lookup_name.
9393
9394         * decl.c (lookup_name): When called from the lexer, look at
9395         got_scope and looking_at_typename; otherwise don't.
9396
9397 Thu Apr  7 22:05:47 1994  Mike Stump  <mrs@cygnus.com>
9398
9399         31th Cygnus<->FSF merge.
9400
9401 Thu Apr  7 17:47:53 1994  Jason Merrill  (jason@deneb.cygnus.com)
9402
9403         * decl2.c (mark_vtable_entries): Call this to mark all the
9404         entries in the vtable addressable.
9405         (finish_decl_parsing): Handle SCOPE_REFs.
9406
9407         * decl.c (decls_match): Always call compparms with strict == 1.
9408         Handle the special case of C function redecl here.
9409         (duplicate_decls): Only keep the old type if the new decl takes no
9410         arguments.
9411
9412         * typeck.c (compparms): Also allow t1 to be ... if strict == 0.
9413
9414 Thu Apr  7 16:17:50 1994  Mike Stump  <mrs@cygnus.com>
9415
9416         * class.c (build_vtable_entry): Fix breakage introduced Apr 5
9417         17:48:41.
9418
9419 Wed Apr  6 16:05:10 1994  Per Bothner  (bothner@kalessin.cygnus.com)
9420
9421         * init.c (build_virtual_init), search.c (build_vbase_vtables_init),
9422         ch-tree.h:  Every place these functions were called, the result was
9423         immediately passed to expand_expr_stmt.  Reduce redundancy by
9424         calling expand_expr_init *inside* these functions.  These
9425         makes for a simpler interface, and we don't have to build
9426         compound expressions.  Hence, rename these function to:
9427         expand_virtual_init and expand_vbase_vtables_init respectively.
9428         * init.c, decl.c:  Change callers of these functions.
9429         * init.c, cp-tree.h (expand_virtual_init):  Make static.
9430
9431         * decl2.c (finish_file): Check TREE_PUBLIC||TREE_ADDRESSABLE
9432         rather than DECL_SAVED_INSNS before emitting inlines.
9433
9434 Wed Apr  6 13:06:39 1994  Jason Merrill  (jason@deneb.cygnus.com)
9435
9436         * spew.c (init_spew): #if 0 out stuff used by arbitrate_lookup.
9437
9438         * decl.c (duplicate_decls): If this is a new declaration of an
9439         extern "C" function, keep the type (for the argtypes).
9440         (redeclaration_error_message): Don't check DECL_LANGUAGE here.
9441         (decls_match): Call compparms with a value of strict dependent on
9442         the value of strict_prototypes for DECL_LANGUAGE (oldecl).
9443
9444         * typeck.c (compparms): ... is only equivalent to non-promoting
9445         parms if we're not being strict.
9446
9447         * parse.y (empty_parms): Don't check flag_ansi || pedantic here.
9448
9449         * decl.c (init_decl_processing): if (flag_ansi || pedantic)
9450         strict_prototypes_lang_c = strict_prototypes_lang_cplusplus;
9451
9452         * decl2.c (grok_function_init): Don't set DECL_INITIAL on pure
9453         virtuals.
9454
9455 Tue Apr  5 17:48:41 1994  Per Bothner  (bothner@kalessin.cygnus.com)
9456
9457         Support for implementing vtables with thunks.
9458         * tree.def (THUNK_DECL):  New TREE_CODE.
9459         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY), tree.c
9460         (fnaddr_from_vtable_entry):  Handle flag_vtable_thunks case.
9461         * cp-tree.h (memptr_type):  New variable.
9462         * class.c (build_vtable_entry):  Build thunk if necessary.
9463         * class.c (build_vfn_ref):  If using thunks, don't need
9464         to add delta field from vtable (there is none!).
9465         * decl.c: Add memptr_type as well as vtable_entry_type.
9466         If using thunks, the latter is just ptr_type_node.
9467         * gc.c, typeck.c:  Use memptr_typeChange, not vtable_entry_type.
9468         * decl2.c (finish_vtable_vardecl):  Handle thunks.
9469         * expr.c (cplus_expand_expr):  Support THUNK_DECL.
9470
9471         * decl.c (grokdeclarator):  Set DECL_THIS_EXTERN if "extern".
9472         * decl.c (start_function):  Set current_extern_inline based on
9473         DECL_THIS_EXTERN, not TREE_PUBLIC.
9474         * decl.c (finish_function):  Call mark_inline_for_output if needed,
9475
9476         Improve intelligence about when to emit inlines.
9477         * cp-tree.h (lang_decl_flags):  New field saved_inline.
9478         * cp-tree.h (DECL_SAVED_INLINE):  New macro.
9479         * class.c (add_virtual_function):  Don't set TREE_ADDRESSABLE.
9480         * decl.h, decl.c (pending_addressable_inlines):  Removed.
9481         * decl2.c (pending_addressable_inlines):  Renamed to saved_inlines.
9482         * decl2.c (mark_inline_for_output):  Do nothing if
9483         DECL_SAVED_INLINE;  otherwise set it (and add to saved_inlines list).
9484         * decl2.c (finish_vtable_vardecl):  SET_CLASSTYPE_INTERFACE_KNOWN
9485         and set CLASSTYPE_INTERFACE_ONLY if there is a non-inline virtual.
9486         * decl2.c (finish_file):  Writing out inlines later, so we can
9487         also handle the ones needed for vtbales.
9488         * decl2.c (write_vtable_entries, finish_vtable_typedecl):  Removed.
9489
9490         * cp-tree.h, class.c, decl2.c, search.c:  Remove -fvtable-hack
9491         and flag_vtable_hack.   Use -fvtable-thunks and flag_vtable_thunks
9492         instead.  (The rationale is that these optimizations both break binary
9493         compatibility, but should become the default in a future release.)
9494
9495 Wed Apr  6 10:53:56 1994  Mike Stump  <mrs@cygnus.com>
9496
9497         * class.c (modify_vtable_entries): Never reset the DECL_CONTEXT
9498         of a fndecl, as we might not be from that vfield.
9499
9500 Tue Apr  5 17:43:35 1994  Kung Hsu  (kung@mexican.cygnus.com)
9501
9502         * class.c (add_virtual_function): fix bug for pure virtual, so
9503         that DECL_VINDEX of the dummy decl copied won't be error.
9504         (see also Apr 4 change)
9505
9506 Tue Apr  5 17:23:45 1994  Per Bothner  (bothner@kalessin.cygnus.com)
9507
9508         * typeck.c (c_expand_return):  Before checking that we're not
9509         returning the address of a local, make sure it's a VAR_DECL.
9510         (And don't worry about it being a TREE_LIST.)
9511
9512 Tue Apr  5 13:26:42 1994  Jason Merrill  (jason@deneb.cygnus.com)
9513
9514         * parse.y (YYDEBUG): Always define.
9515         * lex.c (YYDEBUG): Ditto.
9516
9517 Mon Apr  4 11:28:17 1994  Kung Hsu  (kung@mexican.cygnus.com)
9518
9519         * class.c (finish_struct): backup out the change below, put the
9520         new change for the same purpose. The change below breaks code.
9521
9522         * class.c (finish_struct): if pure virtual, copy node and make
9523         RTL point to abort, then put in virtual table.
9524         * decl2.c (grok_function_iit): reinstate Mar 31 change.
9525
9526 Sat Apr  2 03:12:58 1994  Jason Merrill  (jason@deneb.cygnus.com)
9527
9528         * init.c (build_new): pedwarn about newing const and volatile
9529         types.
9530
9531         * tree.c (get_identifier_list): Only do the special handling
9532         thing if we're dealing with the main variant of the record type.
9533
9534         * cvt.c (convert_to_reference): When converting between
9535         compatible reference types, use the pointer conversion machinery.
9536         Don't just blindly overwrite the old type.
9537
9538 Fri Apr  1 17:14:42 1994  Jason Merrill  (jason@deneb.cygnus.com)
9539
9540         * call.c (build_method_call): When looking at global functions,
9541         be sure to use instance_ptr for the first argument, not some version
9542         of it that has been cast to a base class.  Also do this before
9543         comparing candidates.
9544
9545 Thu Mar 31 19:50:35 1994  Jason Merrill  (jason@deneb.cygnus.com)
9546
9547         * call.c (build_method_call): Constructors can be called for
9548         const objects.
9549
9550 Thu Mar 31 16:20:16 1994  Kung Hsu  (kung@mexican.cygnus.com)
9551
9552         * decl2.c (grok_func_init): do not abort as rtl for pur virtual
9553         fucntions. They can be defined somewhere else.
9554
9555 Sat Jan 23 23:23:26 1994  Stephen R. van den Berg  (berg@pool.informatik.rwth-aachen.de)
9556
9557         * decl.c (init_decl_processing): Declare __builtin_return_address
9558         and __builtin_frame_address for C++ as well.
9559
9560 Thu Mar 31 12:35:49 1994  Mike Stump  <mrs@cygnus.com>
9561
9562         * typeck2.c (store_init_value): Integral constant variables are
9563         always constant, even when doing -fpic.
9564
9565 Sat Jan 23 23:23:26 1994  Stephen R. van den Berg  (berg@pool.informatik.rwth-aachen.de)
9566
9567         * decl.c (redeclaration_error_message): Pass the types to
9568         comptypes.
9569
9570 Wed Mar 30 21:29:25 1994  Mike Stump  <mrs@cygnus.com>
9571
9572         Cures incorrect errors about pure virtuals in a class, when they
9573         have been overridden in a derived class.
9574
9575         * search.c (get_abstract_virtuals): Reimplement.
9576         * search.c (get_abstract_virtuals_1): New routine.
9577
9578 Wed Mar 30 14:10:04 1994  Jason Merrill  (jason@deneb.cygnus.com)
9579
9580         * pt.c (push_template_decls): Make the pushed level pseudo
9581         global.
9582
9583         * parse.y (extdefs): Don't pop everything if the current binding
9584         level is pseudo_global.
9585
9586         * decl.c (pop_everything): Stop on reaching a pseudo-global
9587         binding level.
9588
9589         * cp-tree.h (DECL_FUNCTION_MEMBER_P): Change to more reliable test.
9590
9591         * decl.c (duplicate_decls): Only copy DECL_SOURCE_{FILE_LINE} if
9592         the old decl actually had an initializer.
9593
9594         * {various}: Clean up gcc -W complaints.
9595
9596         * cp-tree.h (DECL_FUNCTION_MEMBER_P): Currently defined to be
9597         (DECL_CONTEXT (NODE) != NULL_TREE).
9598
9599         * parse.y (lang_extdef): Call pop_everything if necessary.
9600
9601         * decl.c (pop_everything): New function for popping binding
9602         levels left over after a syntax error.
9603         (pushdecl): Use DECL_FUNCTION_MEMBER_P to decide whether or not
9604         a function is a member.
9605
9606 Wed Mar 30 14:20:50 1994  Mike Stump  <mrs@cygnus.com>
9607
9608         Cures calling a more base base class function, when a more derived
9609         base class member should be called in some MI situations.
9610
9611         * search.c (make_binfo): Use more the more specialized base
9612         binfos from the binfo given as the second argument to make_binfo,
9613         instead of the unspecialized ones from the TYPE_BINFO.
9614         * class.c (finish_base_struct): Ditto, update callers.
9615         * search.c (dfs_get_vbase_types): Ditto.
9616         * tree.c (propagate_binfo_offsets, layout_vbasetypes): Ditto.
9617         * decl.c (xref_tag): Use NULL_TREE instead of 0.
9618         * lex.c (make_lang_type): Ditto.
9619
9620 Wed Mar 30 14:10:04 1994  Jason Merrill  (jason@deneb.cygnus.com)
9621
9622         * decl.c (pushdecl): If pushing a C-linkage function, only do a
9623         push_overloaded_decl.
9624         (duplicate_decls): Standard overloading does not shadow built-ins.
9625
9626 Tue Mar 29 00:54:18 1994  Jason Merrill  (jason@deneb.cygnus.com)
9627
9628         * pt.c (end_template_decl): Don't call push_overloaded_decl.
9629
9630         * init.c (do_friend): Don't call push_overloaded_decl.
9631
9632         * decl.c (pushdecl): Call push_overloaded_decl for functions and
9633         function templates.
9634         (duplicate_decls): functions and function templates are not
9635         duplicates, but don't complain about calling this function to
9636         compare them.
9637         (push_overloaded_decl): Don't deal with linkage.  Call
9638         duplicate_decls.
9639         (redeclaration_error_message): Deal with linkage.
9640
9641         * decl.c (start_function): If push_overloaded_decl returns an
9642         older version of the function, deal with it.
9643
9644         * decl.c (start_function): Be sure only to push_overloaded_decl
9645         for non-members.
9646
9647         * decl.c (grokfndecl): Put back clearing of DECL_CHAIN for
9648         methods.
9649         (start_function): Lose broken and redundant code for checking old
9650         decl.
9651
9652         * init.c (add_friend): Give line numbers of both friend decls
9653         when warning about re-friending.
9654
9655         * pt.c (tsubst): Use comptypes rather than == to compare the
9656         types of the method as declared and as defined, since default
9657         parameters may be different.
9658
9659         * call.c (build_method_call): Use brendan's candidate printing
9660         routine.
9661
9662         * decl.c (start_method): Methods defined in the class body are
9663         inline whether or not it's a template class.
9664
9665 Mon Mar 28 16:39:26 1994  Jason Merrill  (jason@deneb.cygnus.com)
9666
9667         * parse.y (initdcl0): Add "extern" to current_declspecs if
9668         have_extern_spec && ! used_extern_spcec.
9669
9670         * tree.c (really_overloaded_fn): A fn with more than one
9671         overload.
9672
9673         * pt.c (end_template_decl): Use really_overloaded_fn.
9674
9675         * decl.c (duplicate_decls): When smashing a decl into a previous
9676         definition, keep the old file and line.
9677         Don't deal with overloaded functions.
9678         Lose old code for checking arg types of functions.
9679         Check for overloaded C functions.
9680         (pushdecl): Deal with overloaded functions.
9681         (start_decl): Expect pushdecl to return an appropriate function decl.
9682         (start_function): Ditto.
9683         (push_overloaded_decl): Don't check for overloaded C functions.
9684
9685         * *.c: Stop using DECL_OVERLOADED, it being archaic.
9686         TREE_OVERLOADED should probably go, too.
9687
9688 Mon Mar 28 14:00:45 1994  Ron Guilmette  (rfg@netcom.com)
9689
9690         * typeck.c (comp_target_types): Call comp_target_parms with
9691         strict == 1.
9692
9693 Sun Mar 27 00:07:45 1994  Jason Merrill  (jason@deneb.cygnus.com)
9694
9695         * parse.y (empty_parms): Don't parse () as (...) in extern "C"
9696         sections if we're compiling with -ansi or -pedantic.
9697
9698         * decl.c (decls_match): Don't treat (int) and (int&) as matching.
9699
9700         * decl2.c (grokfield): Don't pedwarn twice about initializing
9701         field.
9702
9703         * decl.c (push_overloaded_decl): Warn about shadowing
9704         constructor.
9705         (redeclaration_error_message): Don't allow 'int a; int a;'
9706
9707         * cvt.c (build_up_reference): Only check for valid upcast if
9708         LOOKUP_PROTECT is set, not just any flag.
9709
9710 Fri Mar 25 01:22:31 1994  Jason Merrill  (jason@deneb.cygnus.com)
9711
9712         * lex.c (check_newline): When we see a #pragma implementation,
9713         also set it for the main input file.
9714
9715         * init.c (build_new): Convert array size argument to size_t.
9716
9717         * parse.y (primary): If we're doing a parenthesized type-id, call
9718         groktypename before passing it to build_new.
9719
9720         * call.c (build_method_call): Deal properly with const and
9721         volatile for instances of reference type.
9722
9723         * decl.c (store_return_init): Change 'if (pedantic) error' to 'if
9724         (pedantic) pedwarn'.
9725
9726         * decl.c (grokdeclarator): Don't complain about putting `static'
9727         and `inline' on template function decls.
9728
9729 Thu Mar 24 23:18:19 1994  Jason Merrill  (jason@deneb.cygnus.com)
9730
9731         * call.c (build_method_call): Preserve const & volatile on
9732         `this'.
9733
9734 Thu Mar 24 16:21:52 1994  Mike Stump  <mrs@cygnus.com>
9735
9736         * init.c (build_new, build_vec_delete): Use global new and delete
9737         for arrays. 
9738         * decl2.c (delete_sanity): Ditto.
9739
9740 Thu Mar 24 02:10:46 1994  Jason Merrill  (jason@deneb.cygnus.com)
9741
9742         * cvt.c (convert_to_reference): If i is an lvalue,
9743         (int &)i -> *(int*)&i, as per 5.2.8p9 of the latest WP.
9744         (convert_force): Call convert_to_reference with LOOKUP_COMPLAIN.
9745
9746 Wed Mar 23 17:45:37 1994  Jason Merrill  (jason@deneb.cygnus.com)
9747
9748         * decl.c (duplicate_decls): Also propagate DECL_TEMPLATE_MEMBERS
9749         and DECL_TEMPLATE_INSTANTIATIONS.
9750
9751         * init.c (build_new): Handle array typedefs properly.
9752
9753 Wed Mar 23 18:23:33 1994  Mike Stump  <mrs@cygnus.com>
9754
9755         30th Cygnus<->FSF merge.
9756
9757 Wed Mar 23 00:46:24 1994  Mike Stump  <mrs@cygnus.com>
9758
9759         * class.c (modify_vtable_entries): Avoid running off the end of the
9760         virtuals list when processing a virtual destructor.
9761         * class.c (get_vtable_entry): Ditto.
9762
9763 Wed Mar 23 00:23:59 1994  Jason Merrill  (jason@deneb.cygnus.com)
9764
9765         * decl.c (duplicate_decls): If two template decls don't match,
9766         just return 0.
9767
9768 Tue Mar 22 23:49:41 1994  Jason Merrill  (jason@deneb.cygnus.com)
9769
9770         * typeck.c (convert_for_assignment): Don't pedwarn about
9771         converting function pointer to void *.
9772
9773 Tue Mar 22 22:23:19 1994  Mike Stump  <mrs@cygnus.com>
9774
9775         Major revamp of pointer to member functions.  Cures major
9776         nonfunctionality when used in casts, and MI situations.
9777
9778         * cvt.c (convert_force): Update call site of build_ptrmemfunc.
9779         * typeck.c (convert_for_assignment): Ditto.
9780         * typeck2.c (digest_init): Ditto.
9781         * typeck2.c (process_init_constructor): Simplify by moving code into
9782         digest_init.
9783         * typeck2.c (digest_init): Do default_conversions on init value, if
9784         we are processing pointer to member functions.
9785         * class.c (get_vfield_offset): Now non-static.  Convert bit offset
9786         into byte offset.
9787         * cp-tree.h (get_vfield_offset): Ditto.
9788         * typeck.c (get_member_function_from_ptrfunc): Convert down to right
9789         instance, before fetching vtable pointer.
9790         * typeck.c (get_delta_difference): New routine.
9791         * typeck.c (build_ptrmemfunc): Revamp to handle casting better, also
9792         get vtable pointer out of right subobject.
9793
9794 Tue Mar 22 17:56:48 1994  Mike Stump  <mrs@cygnus.com>
9795
9796         * search.c (get_binfo): Return NULL instead of aborting, when
9797         passed a UNION_TYPE.
9798
9799 Tue Mar 22 12:44:54 1994  Jason Merrill  (jason@deneb.cygnus.com)
9800
9801         These patches implement handling of redefinition/redeclaration of
9802         templates.
9803
9804         * typeck.c (comptypes): Simplify.  All TEMPLATE_TYPE_PARMs are
9805         considered compatible.
9806
9807         * parse.y (template_def): Pass defn argument to end_template_decl.
9808
9809         * pt.c (end_template_decl): Add defn argument.  Check for
9810         redefinition.  Simplify.
9811
9812         * error.c (OB_UNPUT): New macro, to remove mistakes.
9813         (aggr_variety): Subroutine of dump_aggr_type.
9814
9815         * decl.c (decls_match): Support templates.
9816         (duplicate_decls): No longer static.  Don't try to lay out template
9817         decls.
9818         (pushdecl): Simplify.
9819
9820         * cp-tree.h (DECL_TEMPLATE_MEMBERS): Use DECL_SIZE instead of
9821         DECL_INITIAL.
9822
9823 Mon Mar 21 11:46:55 1994  Jason Merrill  (jason@deneb.cygnus.com)
9824
9825         * error.c (dump_decl): Support class template decls.
9826         (dump_type): Don't adorn template type parms.
9827
9828         * decl.c (duplicate_decls): Save DECL_TEMPLATE_INFO from old decl
9829         if it was a definition.
9830         (redeclaration_error_message): Do the cp_error thang, and reject
9831         redefinition of templates.
9832
9833 Mon Mar 21 19:36:06 1994  Per Bothner  (bothner@kalessin.cygnus.com)
9834
9835         * decl.c (grokdeclarator):  Set TREE_PUBLIC for METHOD_TYPE
9836         in FIELD context, when appropriate.  Also,
9837         CLASSTYPE_INTERFACE_ONLY is irrelevant to setting TREE_PUBLIC.
9838         Also, simplify check for bogus return specifiers.
9839
9840 Mon Mar 21 11:46:55 1994  Jason Merrill  (jason@deneb.cygnus.com)
9841
9842         * parse.y (after_type_declarator1): Expand type_quals.
9843         (notype_declarator1): Ditto.
9844         (absdcl1): Ditto.
9845
9846 Sat Mar 19 01:05:17 1994  Jason Merrill  (jason@deneb.cygnus.com)
9847
9848         * decl.c (grokdeclarator): Treat class-local typedefs like static
9849         members; i.e. 'typedef int f();' means that f is a function type,
9850         not a method type.
9851
9852         * parse.y (decl): Change direct_* back to *.
9853         (type_id): Change direct_abstract_declarator to absdcl.
9854         (direct_declarator, direct_initdecls, direct_initdcl0): Remove again.
9855
9856 Fri Mar 18 12:47:59 1994  Jason Merrill  (jason@deneb.cygnus.com)
9857
9858         These two patches fix crashes on instantiating a template inside a
9859         function with C linkage or containing labels.
9860
9861         * class.c (current_lang_stacksize): No longer static.
9862
9863         * decl.c (struct saved_scope): Add lang_base, lang_stack,
9864         lang_name, lang_stacksize, and named_labels.
9865         (push_to_top_level): Save them.
9866         (pop_from_top_level): Restore them.
9867
9868         * gxxint.texi (Parser): Update.
9869
9870         These two patches finish moving the task of expr/declarator
9871         ambiguity resolution from the lexer to the parser, and add one more
9872         r/r conflict.  START_DECLARATOR can now be nuked.
9873
9874         * parse.y (decl): Add "direct_" in typespec X rules.
9875         (direct_declarator): New nonterminal for
9876         direct_after_type_declarator and direct_notype_declarator.
9877         (direct_initdecls): Like initdecls, but uses direct_initdcl0.
9878         (direct_initdcl0): Like initdcl0, but uses direct_declarator.
9879         (named_parm): Add typespec direct_declarator rule.
9880
9881         * spew.c (yylex): #if 0 out START_DECLARATOR insertion.
9882
9883         These two patches disable some excessive cleverness on the part of
9884         g++; a non-class declaration always hides a class declaration in the
9885         same scope, and g++ was trying to unhide it depending on the
9886         enclosing expression.
9887
9888         * spew.c (arbitrate_lookup): #if 0 out.
9889
9890         * decl.c (lookup_name): Never call arbitrate_lookup.
9891
9892         * parse.y (complex_notype_declarator1): Add '*'
9893         complex_notype_declarator1 and '&' complex_notype_declarator1 rules.
9894
9895         * parse.y (complex_direct_notype_declarator): Restore id_scope
9896         see_typename TYPENAME rule, remove all other rules beginning with
9897         those tokens.
9898         (notype_unqualified_id): Add '~' see_typename IDENTIFIER rule.
9899
9900 Thu Mar 17 17:30:01 1994  Jason Merrill  (jason@deneb.cygnus.com)
9901
9902         These changes fix the compiler's handling of the functional cast/
9903         object declaration ambiguities in section 6.8 of the ARM.  They also
9904         add 11 reduce/reduce conflicts.  Sigh.
9905
9906         * parse.y: Add precedence decls for OPERATOR and '~'.
9907         (notype_unqualified_id): New nonterminal, encompasses all of the
9908         ANSI unqualified-id nonterminal except TYPENAMEs.
9909         (expr_or_declarator): New nonterminal to delay parsing of code like
9910         `int (*a)'.
9911         (primary): Use notype_unqualified_id.
9912         (decl): Add typespec initdecls ';' and typespec declarator ';'
9913         rules.
9914         (initdcl0): Deal with the above.
9915         (complex_notype_declarator1): A notype_declarator that is not also
9916         an expr_or_declarator.
9917         (complex_direct_notype_declarator): A direct_notype_declarator that
9918         doesn't conflict with expr_or_declarator.  Use
9919         notype_unqualified_id.  Remove id_scope see_typename TYPENAME rule.
9920         (functional_cast): New nonterminal, for the three functional cast
9921         rules.  So that they can be moved after
9922         complex_direct_notype_declarator.
9923         (see_typename): Don't accept type_quals any more.
9924
9925         * decl2.c (reparse_decl_as_expr): New function to deal with parse
9926         nodes for code like `int (*a)++;'.      
9927         (reparse_decl_as_expr1): Recursive subroutine of the above.
9928         (finish_decl_parsing): New function to deal with parse nodes for
9929         code like `int (*a);'.  See the difference?
9930
9931 Thu Mar 17 12:16:10 1994  Mike Stump  <mrs@cygnus.com>
9932
9933         These changes break binary compatibility in code with classes
9934         that use virtual bases.
9935
9936         * search.c (dfs_get_vbase_types): Simplify and correct to make
9937         sure virtual bases are initialized in dfs ordering.
9938         * search.c (get_vbase_types): Simplify and make readable.
9939
9940 Thu Mar 17 12:01:10 1994  Jason Merrill  (jason@deneb.cygnus.com)
9941
9942         * parse.y: s/ typename / type_id /g
9943
9944 Wed Mar 16 17:42:52 1994  Kung Hsu  (kung@mexican.cygnus.com)
9945
9946         * parse.y (typespec): add SCOPE TYPENAME for global scoped 
9947         type. e.g. ::B x.
9948
9949         * decl.c (complete_array_type): fix a bug that in -pendantic
9950         mode even there's no initializer, it will continue to build
9951         default index.
9952
9953 Wed Mar 16 17:43:07 1994  Jason Merrill  (jason@deneb.cygnus.com)
9954
9955         * parse.y (direct_notype_declarator): Add PTYPENAME rule, remove
9956         all of the scoped PTYPENAME rules.
9957
9958 Wed Mar 16 16:39:02 1994  Mike Stump  <mrs@cygnus.com>
9959
9960         * init.c (build_offset_ref): The value of A::typedef_name is
9961         always the TYPE_DECL, and never an error.
9962
9963 Tue Mar 15 20:02:35 1994  Jason Merrill  (jason@deneb.cygnus.com)
9964
9965         * search.c (get_base_distance_recursive): Two binfos can only
9966         represent the same object if they are both via_virtual.
9967
9968         * class.c (finish_base_struct): Check vbases for ambiguity, too.
9969
9970         * search.c (get_vbase_types): Accept binfo argument, too.
9971
9972 Tue Mar 15 19:22:05 1994  Kung Hsu  (kung@mexican.cygnus.com)
9973
9974         * decl.c (complete_array_type): complete TYPE_DOMAIN of the 
9975         initializer also, because back-end requires it.
9976
9977 Tue Mar 15 15:33:31 1994  Jason Merrill  (jason@deneb.cygnus.com)
9978
9979         * error.c (dump_expr): Support member functions (which show up as
9980         OFFSET_REFs).
9981
9982 Mon Mar 14 16:24:36 1994  Mike Stump  <mrs@cygnus.com>
9983
9984         * init.c (build_new): Set the return type of multidimensional
9985         news correctly.
9986
9987 Fri Mar 11 15:35:39 1994  Kung Hsu  (kung@mexican.cygnus.com)
9988
9989         * call.c (build_method_call): if basetype not equal to type
9990         of the instance, use the type of the instance in building
9991         destructor.
9992
9993 Thu Mar 10 17:07:10 1994  Kung Hsu  (kung@mexican.cygnus.com)
9994
9995         * parse.y (direct_notype_declarator): add push_nested_type for
9996         'template_type SCOPED_NAME' rule.
9997
9998 Tue Mar  8 00:19:58 1994  Jason Merrill  (jason@deneb.cygnus.com)
9999
10000         * parse.y (parm): Add typed_declspec1 {absdcl, epsilon} rules.
10001
10002 Sat Mar  5 04:47:48 1994  Jason Merrill  (jason@deneb.cygnus.com)
10003
10004         * parse.y (regcast_or_absdcl): New nonterminal to implement late
10005         reduction of constructs like `int ((int)(int)(int))'.
10006         (cast_expr): Use it.
10007         (sub_cast_expr): Everything that can come after a cast.
10008         (typed_declspecs1): typed_declspecs that are not typed_typespecs.
10009         (direct_after_type_declarator): Lose PAREN_STAR_PAREN rule.
10010         (direct_abstract_declarator): Replace '(' parmlist ')' rule with
10011         '(' complex_parmlist ')' and regcast_or_absdcl.
10012         (parmlist): Split
10013         (complex_parmlist): Parmlists that are not also typenames.
10014         (parms_comma): Enabler.
10015         (named_parm): A parm that is not also a typename.  Use declarator
10016         rather than dont_see_typename abs_or_notype_decl.  Expand
10017         typed_declspecs inline.
10018         (abs_or_notype_decl): Lose.
10019         (dont_see_typename): Comment out.
10020         (bad_parm): Break out abs_or_notype_decl into two rules.
10021
10022 Fri Mar  4 18:22:39 1994  Jason Merrill  (jason@deneb.cygnus.com)
10023
10024         * decl2.c (reparse_decl_as_casts): New function to change parse
10025         nodes for `(int)(int)(int)' from "function taking int and returning
10026         function taking int and returning function taking int" to "... cast
10027         to int, cast to int, cast to int".
10028
10029         * decl2.c (reparse_decl_as_expr): Recursive function to change
10030         parse nodes for `A()()' from "function returning function returning
10031         A" to "A().operator()".
10032
10033         * parse.y (primary): Replace `typespec LEFT_RIGHT' rule with
10034         `typespec fcast_or_absdcl' rule.
10035         (fcast_or_absdcl): New nonterminal to implement late reduction of
10036         constructs like `A()()()()'.
10037         (typename): Replace `typespec absdcl1' rule with
10038         `typespec direct_abstract_declarator' rule.
10039         (direct_abstract_declarator): Replace `LEFT_RIGHT type_quals' rule
10040         with `fcast_or_absdcl type_quals' rule.
10041
10042 Fri Mar  4 16:18:03 1994  Mike Stump  <mrs@cygnus.com>
10043
10044         * tree.c (lvalue_p): Improve OFFSET_REF handling, so that it
10045         matches Section 5.5.
10046
10047 Fri Mar  4 14:01:59 1994  Jason Merrill  (jason@deneb.cygnus.com)
10048
10049         * error.c (dump_type_prefix): Don't print basetype twice for
10050         pmfs.
10051
10052 Fri Mar  4 13:24:33 1994  Mike Stump  <mrs@cygnus.com>
10053
10054         * typeck.c (convert_arguments): Handle setHandler(A::handlerFn)
10055         so that it is like setHandler(&A::handlerFn).  Cures an `invalid
10056         lvalue in unary `&''.
10057
10058 Fri Mar  4 11:15:59 1994  Jason Merrill  (jason@deneb.cygnus.com)
10059
10060         * gxxint.texi (Copying Objects): New section discussing default
10061         op= problems with virtual inheritance.
10062
10063         * decl2.c (grokoptypename): Just does grokdeclarator and
10064         build_typename_overload, since the parser can't call grokdeclarator
10065         directly.
10066
10067         * method.c (build_typename_overload): Set IDENTIFIER_GLOBAL_VALUE
10068         and TREE_TYPE on generated identifiers.
10069
10070         * decl.c (grokdeclarator): Don't deal with TYPE_EXPRs anymore.
10071
10072         * parse.y (parm): Convert `const char *' to `__opPCc' here.
10073
10074         * error.c (dump_decl): Say sorry rather than my_friendly_aborting
10075         if we can't figure out what to do.
10076         (dump_type*): Ditto.
10077
10078         * typeck2.c (build_m_component_ref): 'component' is an expr, not
10079         a decl.  Also move the IS_AGGR_TYPE check after the stripping of
10080         REFERENCE_TYPE.
10081
10082 Fri Mar  4 04:46:05 1994  Mike Stump  <mrs@cygnus.com>
10083
10084         * call.c (build_method_call): Handle b->setHandler(A::handlerFn)
10085         so that it is like b->setHandler(&A::handlerFn).  Cures an `invalid
10086         lvalue in unary `&''.
10087
10088 Thu Mar  3 12:38:15 1994  Jason Merrill  (jason@deneb.cygnus.com)
10089
10090         * parse.y: Add precedence specification for START_DECLARATOR.
10091         (type_quals): Move before primary.
10092         (typename): Move before typed_declspecs, add 'typespec absdcl1' rule.
10093
10094         * decl2.c (grokoptypename): Lose.
10095
10096         * decl.c (grokdeclarator): Parse TYPE_EXPRs in the initial scan,
10097         rather than waiting until later.
10098
10099 Wed Mar  2 14:12:23 1994  Jason Merrill  (jason@deneb.cygnus.com)
10100
10101         * parse.y (unary_expr): Use 'typename' in 'new' rules, rather
10102         than expanding it inline.
10103         (typename): Expand empty option of (former) absdcl inline.
10104         (abs_or_notype_decl): Ditto.
10105         (absdcl): Lose empty rule.
10106         (conversion_declarator): New nonterminal for 'typename' of 'operator
10107         typename'.
10108         (operator_name): Use it instead of absdcl.
10109
10110         * parse.y: Add precedence declarations for SCOPED_TYPENAME,
10111         TYPEOF, and SIGOF.
10112         (typed_declspecs): Accept typed_typespecs, rather than typespec
10113         directly.  Add rules with reserved_typespecquals.
10114         (reserved_declspecs): Don't accept typespecqual_reserved at the
10115         beginning of the list.  The typed_declspecs rule will deal with this
10116         omission.
10117         (declmods): Accept nonempty_type_quals, rather than TYPE_QUAL
10118         directly.
10119
10120         * parse.y (direct_notype_declarator,
10121         direct_after_type_declarator, direct_abstract_declarator): Split up
10122         the declarator1 nonterminals to match the draft standard and avoid
10123         ambiguities.
10124         (new_type_id, new_declarator, direct_new_declarator,
10125         new_member_declarator): New nonterminals to implement the subset of
10126         'typename' allowed in new expressions.
10127         (unary_expr): Use new_type_id instead of typename.
10128         (after_type_declarator1, absdcl1): Fix semantics of member pointers.
10129         (abs_member_declarator, after_type_member_declarator): Lose.
10130
10131         * parse.y (absdcl1): Don't require parens around
10132         abs_member_declarator.
10133         (abs_member_declarator): Lose see_typename from rules.
10134         (after_type_member_declarator): Ditto.
10135
10136         * tree.c (get_identifier_list): New function, containing code
10137         previously duplicated in get_decl_list and list_hash_lookup_or_cons.
10138         (get_decl_list): Use it.
10139         (list_hash_lookup_or_cons): Ditto.
10140
10141         * parse.y (typed_declspecs, declmods): It's not necessary to hash
10142         the declspecs on class_obstack, so don't.  This way typed_typespecs
10143         can reduce to typed_declspecs.
10144
10145 Wed Mar  2 14:29:18 1994  Jason Merrill (jason@cygnus.com)
10146
10147         * cvt.c (build_up_reference): If we aren't checking visibility,
10148         also allow base->derived conversions.
10149
10150 Mon Feb 28 15:14:29 1994  Per Bothner  (bothner@kalessin.cygnus.com)
10151
10152         * typeck.c (build_c_cast): Remove bogus hack when converting
10153         to a reference type.
10154
10155         * cp-tree.h (lang_decl::vbase_init_list, DECL_VBASE_INIT_LIST):
10156         Removed, not used.
10157         (lang_stype::methods, lang_decl::next_method): New fields.
10158         (CLASSTYPE_METHODS, DECL_NEXT_METHOD):  New macros.
10159         * decl.c (duplicate_decls):  Preserve DECL_NEXT_METHOD.
10160
10161         * cp-tree.h, decl2.c (flag_vtable_hack):  New flag.
10162         * decl2.c (finish_vtable_vardecl):  If flag_vtable_hack,
10163         and  !CLASSTYPE_INTERFACE_KNOWN, try to use the presence of
10164         a non-inline virtual function to control emitting of vtables.
10165         * class.c (finish_struct):  Build CLASSTYPE_METHODS list.
10166         * search.c (build_vbase_vtables_init):  Don't assemble_external
10167         (yet) if flag_vtable_hack.
10168         * class.c (build_vfn_ref):  Ditto.
10169
10170 Mon Feb 28 14:54:13 1994  Jason Merrill  (jason@deneb.cygnus.com)
10171
10172         * parse.y (component_decl): Don't include "typed_declspecs
10173         declarator ';'" speedup, since it breaks enums.
10174
10175 Fri Feb 25 15:43:44 1994  Per Bothner  (bothner@kalessin.cygnus.com)
10176
10177         * class.c (finish_struct):  Minor optimization for building
10178         fn_fields list.
10179
10180 Fri Feb 25 15:23:42 1994  Jason Merrill  (jason@deneb.cygnus.com)
10181
10182         * decl.c (start_function): Fix detection of function overloading.
10183
10184 Thu Feb 24 22:26:19 1994  Mike Stump  <mrs@cygnus.com>
10185
10186         * lex.c (check_newline): #pragma interface can take a string
10187         argument, just like #pragma implementation.  #pragma implementation
10188         checks for garbage on the line, line #pragma interface does.  Main
10189         input files do not auto implement like named files, #pragma
10190         implementation must be used explicitly.
10191
10192 Thu Feb 24 17:09:01 1994  Jason Merrill  (jason@deneb.cygnus.com)
10193
10194         * parse.y (components): Handle list of one again.
10195         (notype_components): Ditto.
10196         (after_type_declarator1): Take maybe_raises out again.
10197
10198         * gxxint.texi (Parser): Document additional r/r conflict.
10199
10200 Wed Feb 23 14:42:55 1994  Jason Merrill  (jason@deneb.cygnus.com)
10201
10202         * gxxint.texi (Parser): Add node.
10203
10204         * Makefile.in (stamp-parse): Update expected conflict count.
10205
10206         * parse.y (various): Replace "declmods declarator" with "declmods
10207         notype_declarator".  The comment saying that "declmods declarator ';'"
10208         corresponds to "int i;" was wrong; it corresponds to "const i;".
10209         (component_decl): Add "typed_declspecs declarator ';'" rule; this
10210         *does* correspond to "int i;".  Change "declmods components" to
10211         "declmods notype_components".
10212         (components): Don't deal with a list of one anymore.
10213         (notype_components): New nonterminal, corresponds to notype_declarator.
10214         ({after_,no}type_component_decl{,0}): More new nonterminals.
10215         ({after_,no}type_declarator): Fold in START_DECLARATOR token.
10216         Eliminates four reduce/reduce conflicts.
10217
10218         (expr): Depend on nontrivial_exprlist instead of nonnull_exprlist.
10219         (nontrivial_exprlist): New nonterminal: A list of at least two
10220         expr_no_commas's.
10221         (nonnull_exprlist): Depend on nontrival_exprlist.
10222         Eliminates four reduce/reduce conflicts.
10223
10224         (named_class_head): Move intermediate code block into separate
10225         nonterminal so that we can stick %prec EMPTY on it.
10226
10227         Add more %prec EMPTY's to eliminate remaining shift/reduce
10228         conflicts.
10229
10230         (after_type_declarator): Add maybe_raises to fndecl rules.
10231         (after_type_declarator_no_typename): Remove.
10232         For correctness.
10233
10234         Document remaining reduce/reduce conflicts.
10235
10236 Tue Feb 22 12:10:32 1994  Jason Merrill  (jason@deneb.cygnus.com)
10237
10238         * search.c (get_base_distance): Only bash BINFO_INHERITANCE_CHAIN
10239         (TYPE_BINFO (type)) if we care about the path.
10240
10241         * tree.c (lvalue_p): A COND_EXPR is an lvalue if both of the
10242         options are.
10243
10244 Mon Feb 21 19:59:40 1994  Mike Stump  <mrs@cygnus.com>
10245
10246         * Makefile.in (mostlyclean): lex.c is a source file, don't
10247         remove.
10248
10249 Sat Feb 19 01:27:14 1994  Jason Merrill  (jason@deneb.cygnus.com)
10250
10251         * parse.y: Eliminate 20 shift/reduce conflicts.
10252
10253 Fri Feb 18 11:49:42 1994  Jason Merrill  (jason@deneb.cygnus.com)
10254
10255         * pt.c (type_unification): Add subr argument; if set, it means
10256         that we are calling ourselves recursively, so a partial match is OK.
10257         (unify): Support pointers to methods and functions.
10258         (tsubst): Support method pointers.
10259         * decl.c (build_ptrmemfunc_type): No longer static, so that
10260         tsubst can get at it.
10261
10262         * init.c (is_aggr_typedef): Pretend template type parms are
10263         aggregates.
10264         * decl2.c (build_push_scope): If cname refers to a template type
10265         parm, just grin and nod.        
10266
10267         * call.c (build_overload_call_real): Pass subr argument to
10268         type_unification.
10269         * pt.c (do_function_instantiation): Ditto.
10270         * class.c (instantiate_type): Ditto.
10271
10272         * search.c (get_base_distance): If BINFO is a binfo, use it and
10273         don't mess with its BINFO_INHERITANCE_CHAIN.
10274
10275         * cvt.c (convert_to_reference): Fix temporary generation.
10276         If ambiguous, return error_mark_node.
10277
10278         * init.c (build_new): Put back some necessary code.
10279
10280 Thu Feb 17 15:39:47 1994  Jason Merrill  (jason@deneb.cygnus.com)
10281
10282         * init.c (build_new): Deal with array types properly.
10283
10284         * search.c (get_binfo): Become a shell for get_base_distance.
10285         (get_binfo_recursive): Lose.
10286         (get_base_distance_recursive): Find the path to the via_virtual base
10287         that provides the most access.
10288         (get_base_distance): Ditto.
10289
10290         * parse.y (explicit_instantiation): Syntax is 'template class
10291         A<int>', not 'template A<int>'.
10292
10293         * typeck.c (convert_for_initialization): Remove bogus warning.
10294
10295         * parse.y (datadef): Revert patch of Oct 27.
10296
10297 Thu Feb 17 15:12:29 1994  Per Bothner  (bothner@kalessin.cygnus.com)
10298
10299         * class.c (build_vfn_ref):  Cast delta field to ptrdiff_type_node,
10300         rather than integer_type_node.  Does wonders for the Alpha.
10301
10302 Thu Feb 17 13:36:21 1994  Jason Merrill  (jason@deneb.cygnus.com)
10303
10304         * decl.c (build_ptrmemfunc_type): Make sure that the pmf type
10305         goes onto the same obstack as its target type.
10306
10307 Wed Feb 16 00:34:46 1994  Jason Merrill  (jason@deneb.cygnus.com)
10308
10309         * cvt.c (convert_to_reference): If converting via constructor
10310         on local level, go back to build_cplus_new approach.
10311
10312         * tree.c (build_cplus_new): If with_cleanup_p, set cleanup slot
10313         to error_mark_node to prevent expand_expr from building a cleanup
10314         for this variable.
10315
10316         * lex.c (default_assign_ref_body): Return *this from the memcpy
10317         version, too.
10318
10319         * decl.c (grok_reference_init): Just return if called with
10320         error_mark_node, don't worry about initializing non-const reference
10321         with temporary.
10322
10323         * cvt.c (convert_to_reference): Do the right thing for
10324         non-aggregate reference conversions, pedwarn when generating a
10325         non-const reference to a temporary.
10326
10327         * class.c (finish_struct): TYPE_HAS_COMPLEX_{INIT,ASSIGN}_REF and
10328         TYPE_NEEDS_CONSTRUCTING all depend on TYPE_USES_VIRTUAL_BASECLASSES
10329         again.
10330
10331 Tue Feb 15 19:47:19 1994  Jason Merrill  (jason@deneb.cygnus.com)
10332
10333         * decl.c (grok_reference_init): Pawn off a lot of the work on
10334         convert_to_reference.  Generally do the right thing.
10335
10336         * cvt.c (convert_to_reference): Conform to the initial comment;
10337         i.e. don't create temps if decl != error_mark_node.  Handle
10338         cleanups better for temps that do get created.  Don't pretend
10339         that we can use an 'A' to initialize a 'const double &' just by
10340         tacking on a NOP_EXPR.  Support LOOKUP_SPECULATIVELY.
10341
10342         * call.c (build_method_call): Set TREE_HAS_CONSTRUCTOR on
10343         constructor calls.      
10344
10345 Mon Feb 14 14:50:17 1994  Jason Merrill  (jason@deneb.cygnus.com)
10346
10347         * decl.c (grok_reference_init): Make a temporary for initializing
10348         const reference from constant expression.
10349
10350 Mon Feb 14 11:31:31 1994  Per Bothner  (bothner@kalessin.cygnus.com)
10351
10352         * cp-tree.h, decl.c (set_identifier_local_value):  Deleted function.
10353         * decl.c (pushdecl):  Define decl in correct binding_level
10354         (which isn't always the inner_binding_level).
10355
10356         * cvt.c (build_up_reference):  Don't ever call expand_aggr_init.
10357         It's ugly, and I don't think it's the right thing to do.
10358
10359         * cp-tree.h, class.c, decl.c, decl2.c, sp/search.c: 
10360         Remove NEW_CLASS_SCOPING, assuming it is always 1.
10361         * decl.c (pop_decl_level):  Removed; manually inlined.
10362
10363 Sun Feb 13 19:04:56 1994  Jason Merrill  (jason@deneb.cygnus.com)
10364
10365         * class.h (candidate): Add basetypes field.
10366
10367         * call.c (build_method_call): Do access checking after choosing a
10368         function, not before.
10369
10370         * Makefile.in (cvt.o, call.o, method.o): Depend on class.h.
10371         (mostlyclean): Remove ../cc1plus.
10372
10373 Fri Feb 11 11:52:26 1994  Jason Merrill  (jason@deneb.cygnus.com)
10374
10375         * class.c (finish_struct): Don't allow adjusting access to a field
10376         of a base class if a local field has the same name.
10377
10378         * error.c (dump_type_prefix): Output basetype for METHOD_TYPEs.
10379
10380 hu Jan 13 17:55:51 EST 1994 Gnanasekaran Swaminathan (gs4t@virginia.edu)
10381
10382             * cp-tree.h (DESTRUCTOR_NAME_P): do not confuse AUTO_TEMP names
10383             with destructor names when either NO_DOLLAR_IN_LABEL or
10384             NO_DOT_IN_LABEL are not defined.
10385
10386             Now `template <class T, T f(T&), const T*> class A {...}' works.
10387
10388             * pt.c (grok_template_type): substitute template parm types
10389             with actual types in complex type as well.
10390             (coerce_template_parms): update the grok_template_type ()
10391             function call.
10392
10393         * pt.c (tsubst): Traverse method list using DECL_CHAIN.
10394
10395         * decl.c (grok_op_properties): Allow operator++/-- to have
10396         default arguments.
10397
10398         * typeck2.c (store_init_value): Don't abort when called to
10399         initialize a type that needs constructing with a CONSTRUCTOR.
10400
10401         * init.c (expand_aggr_init_1, CONSTRUCTOR case): If
10402         store_init_value fails, build and expand an INIT_EXPR.  If
10403         store_init_value succeeds, call expand_decl_init.
10404
10405 Fri Feb 11 02:49:23 1994  Mike Stump  <mrs@cygnus.com>
10406
10407         * class.c (build_vbase_path): Use complete_type_p instead of
10408         resolves_to_fixed_type_p to determine if the virtual bases are in
10409         their right place for the type of expr.  Cures problem of thinking a
10410         virtual base class is one place, when it is in fact someplace else.
10411
10412 Fri Feb 11 00:26:46 1994  Mike Stump  <mrs@cygnus.com>
10413
10414         * init.c (resolve_offset_ref): Make sure we first convert to
10415         intermediate type, if given, when dealing with members off `this'.
10416         Solves an incorrrect `type `foo' is not a base type for type
10417         `multiple'' when it is infact, a base type.
10418
10419 Thu Feb 10 21:49:35 1994  Mike Stump  <mrs@cygnus.com>
10420
10421         * class.c (modify_other_vtable_entries): Use get_binfo, instead
10422         of binfo_value.  Solves problem with compiler giving a `base class
10423         `B' ambiguous in binfo_value (compiler error)' on complex MI
10424         herarchies, when a virtual function is first defied in a virtual
10425         base class.
10426
10427 Thu Feb 10 17:19:32 1994  Mike Stump  <mrs@cygnus.com>
10428
10429         * class.c (build_vbase_path): Don't complain about ambiguous
10430         intermediate conversion when converting down to a virtual base
10431         class, even if they might seem to be ambiguous.
10432
10433 Thu Feb 10 12:18:26 1994  Jason Merrill  (jason@deneb.cygnus.com)
10434
10435         * typeck2.c (build_functional_cast): #if 0 out constructor
10436         inheritance code, improve error messages.
10437
10438         * class.c (finish_base_struct): Complain about base with only
10439         non-default constructors in derived class with no constructors.
10440
10441         * decl.c (grokdeclarator): Fix detection of virtual new/delete.
10442
10443 Wed Feb  9 22:02:32 1994  Mike Stump  <mrs@cygnus.com>
10444
10445         * search.c (build_mi_virtuals, add_mi_virtuals,
10446         report_ambiguous_mi_virtuals): Removed unneeded code.
10447         * class.c (finish_struct_bits): Ditto.
10448
10449 Wed Feb  9 11:27:17 1994  Jason Merrill  (jason@deneb.cygnus.com)
10450
10451         * pt.c (end_template_instantiation): Push decl before
10452         pop_from_top_level.
10453
10454         * typeck2.c (build_m_component_ref): Make sure datum is of
10455         aggregate type.
10456
10457         * init.c (get_type_value): New function, returns
10458         IDENTIFIER_TYPE_VALUE or IDENTIFIER_CLASS_TYPE_VALUE or NULL_TREE.
10459
10460         * call.c (build_method_call): Don't die on call to destructor for
10461         non-type.
10462
10463         * decl.c (grokdeclarator): Complain about virtual op new and op
10464         delete, make static virtuals unvirtual instead of unstatic.
10465
10466         * typeck.c (build_c_cast): Also call default_conversion on
10467         methods.
10468
10469         * decl.c (grokdeclarator): Don't complain about anonymous
10470         bitfields.
10471
10472         * parse.y (simple_stmt, for loops): Move the continue point after
10473         the cleanups.
10474
10475         * class.c (finish_struct): Fix setting of
10476         TYPE_HAS_COMPLEX_INIT_REF.
10477
10478 Tue Feb  8 13:21:40 1994  Jason Merrill  (jason@deneb.cygnus.com)
10479
10480         * init.c (build_new): Deal with `new double (1)'.
10481
10482         * class.c (finish_struct): TYPE_HAS_COMPLEX_*_REF are supersets of
10483         TYPE_HAS_REAL_*_REF, but TYPE_HAS_COMPLEX_INIT_REF is independent of
10484         TYPE_NEEDS_CONSTRUCTING.
10485
10486         * decl.c (duplicate_decls): Propagate access decls.
10487
10488         * typeck2.c (process_init_constructor): Accept empty_init_node
10489         for initializing unions.
10490
10491         * class.c, lex.c, cp-tree.h: Use
10492         TYPE_HAS_COMPLEX_ASSIGN_REF where TYPE_HAS_REAL_ASSIGN_REF was used
10493         before, use TYPE_HAS_COMPLEX_INIT_REF for TYPE_NEEDS_CONSTRUCTING in
10494         some places.
10495
10496         * decl.c (finish_decl): Don't complain about uninitialized const
10497         if it was initialized before.
10498
10499 Mon Feb  7 18:12:34 1994  Jason Merrill  (jason@deneb.cygnus.com)
10500
10501         * lex.c (default_assign_ref_body): Don't deal with vbases for
10502         now.
10503
10504         * decl.c (finish_decl): Fix reversed logic for objects and other
10505         things that need to be constructed but have no initializer.
10506
10507         * class.c (finish_struct): Don't set TYPE_HAS_* flags that are
10508         set by grok_op_properties or finish_decl.
10509
10510         * decl.c: Don't warn about extern redeclared inline unless
10511         -Wextern-inline is given.
10512         * decl2.c (lang_decode_option): Ditto.
10513         * cp-tree.h: Ditto.
10514
10515 Mon Feb  7 17:29:24 1994  Per Bothner  (bothner@kalessin.cygnus.com)
10516
10517         * decl.c (pushdecl_with_scope): Fix thinko.  Add forward
10518         declaration.
10519
10520         * decl.c (pushdecl_with_scope):  New function.
10521         * decl.c (pushdecl_top_level):  Use new function.
10522         * decl.c (pushtag):  Initialize newdecl.
10523         * decl.c (pushtag):  Push new type decl into correct scope.
10524
10525 Mon Feb  7 14:42:03 1994  Jason Merrill  (jason@deneb.cygnus.com)
10526
10527         * call.c, cvt.c, init.c, search.c, cp-tree.h:
10528         Eradicate LOOKUP_PROTECTED_OK.
10529
10530 Mon Feb  7 13:57:19 1994  Per Bothner  (bothner@kalessin.cygnus.com)
10531
10532         * decl.c (pushtag, xref_tag), cp-tree.h:  Add extra parameter
10533          'globalize' to signify implicit declarations.
10534         * decl.c (globalize_nested_type, maybe_globalize_type):  Removed.
10535         * decl.c (set_identifier_type_value_with_scope):  New function.
10536         * decl.c (set_identifier_local_value):  Simplify.
10537         * spew.c (yylex, do_addr):  Modify to return a _DEFN if a
10538         forward declaration (followed by ';' and not preceded by 'friend').
10539         * class.c, decl.c, except.c, init.c, parse.y,
10540         pt.c, search.c: Add new argument to calls to xref_tag and
10541         pushtag.
10542
10543 Mon Feb  7 00:22:59 1994  Jason Merrill  (jason@deneb.cygnus.com)
10544
10545         * cp-tree.h (ACCESSIBLY_UNIQUELY_DERIVED_P): New macro, means what
10546         ACCESSIBLY_DERIVED_FROM_P meant before.
10547         (ACCESSIBLY_DERIVED_FROM_P): Now disregards ambiguity.
10548
10549         * cvt.c (build_up_reference): Call get_binfo with PROTECT == 1.
10550
10551         * search.c (get_base_distance_recursive): Members and friends of
10552         a class X can implicitly convert an X* to a pointer to a private or
10553         protected immediate base class of X.
10554         (get_binfo_recursive): Ditto.
10555         (get_base_distance): Ignore ambiguity if PROTECT < 0.
10556         (get_binfo): Lose multiple values of PROTECT.
10557         (compute_access): Protected is OK if the start of the
10558         search is an accessible base class of current_class_type.
10559
10560         * method.c (build_opfncall): Do check access on operator new here.
10561
10562         * decl.c (finish_function): Don't check access on operator new
10563         here.
10564
10565 Sun Feb  6 14:06:58 1994  Jason Merrill  (jason@deneb.cygnus.com)
10566
10567         * decl.c (xref_tag): The base of a derived struct is NOT always
10568         public.  Duh.
10569
10570         * pt.c (do_explicit_instantiation): New function, called from
10571         parser to do explicit function instantiation.
10572         (type_unification): Allow the args list to be terminated with
10573         void_list_node.
10574         (do_pending_expansions): Look at i->interface for non-member
10575         templates.
10576
10577         * parse.y (datadef): Move explicit_instantiation here.
10578         (structsp): From here.
10579         (datadef): Complain about `int;'.
10580
10581 Sun Feb  6 12:33:18 1994  Per Bothner  (bothner@kalessin.cygnus.com)
10582
10583         * pt.c (end_template_instantiation), cp-tree.h:  Remove unused
10584         second parameter, and simplify first from a TREE_LIST where
10585         we only care about its TREE_VALUE to just the value (an IDENTIFIER).
10586         * pt.c (instantiate_member_templates):  Simplify argument list
10587         from a TREE_LIST to just an IDENTIFIER.
10588         * lex.c (yyprint):  PRE_PARSED_CLASS_DECL is now just an IDENTIFIER.
10589         * parse.y (template_instantiate_once):  Simplify accordingly.
10590         * decl.c (inner_binding_level): New.  Use various places to
10591         simplify.
10592
10593 Sun Feb  6 02:49:37 1994  Jason Merrill  (jason@deneb.cygnus.com)
10594
10595         * typeck2.c (build_functional_cast): int() -> int(0).
10596
10597 Sat Feb  5 00:53:21 1994  Jason Merrill  (jason@deneb.cygnus.com)
10598
10599         * class.c (finish_struct): Don't do a bitwise copy for op= if the
10600         class has a virtual function table.
10601
10602         * typeck.c (convert_for_initialization): Restore warnings about
10603         not using defined op=.  Should really be my_friendly_aborts, I
10604         s'pose.
10605
10606 Fri Feb  4 14:21:00 1994  Jason Merrill  (jason@deneb.cygnus.com)
10607
10608         * class.c (finish_struct): Tidy up conditions for doing bitwise
10609         copies of objects.
10610
10611         * decl.c (build_default_constructor): #if 0 out.
10612
10613         * *: Eradicate TYPE_GETS_{ASSIGNMENT,ASSIGN_REF,CONST_ASSIGN_REF,
10614         CONST_INIT_REF}, TYPE_HAS_REAL_CONSTRUCTOR.
10615
10616         * decl.c (grokdeclarator): Don't return void_type_node for
10617         friends being defined here.
10618
10619         * init.c (perform_member_init): Only do the init if it's useful.
10620
10621         * lex.c (default_copy_constructor_body): If we don't need to do
10622         memberwise init, just call __builtin_memcpy.
10623         (default_assign_ref_body): Ditto.
10624
10625         * decl.c (grokdeclarator): If friendp && virtualp, friendp = 0.
10626
10627 Fri Feb  4 13:02:56 1994  Mike Stump  <mrs@cygnus.com>
10628
10629         * lex.c (reinit_parse_for_method, cons_up_default_function):
10630         Don't give warn_if_unknown_interface warning when it came from a
10631         system header file.
10632         * pt.c (end_template_decl, instantiate_template): Ditto.
10633         * decl.c (start_decl): Ditto.
10634
10635 Fri Feb  4 00:41:21 1994  Jason Merrill  (jason@deneb.cygnus.com)
10636
10637         * decl.c (grokdeclarator): Don't try to set TYPE_WAS_ANONYMOUS on
10638         enums.
10639
10640         * decl2.c (constructor_name_full): Use IS_AGGR_TYPE_CODE instead of
10641         IS_AGGR_TYPE, since we don't know it's a type.
10642
10643 Thu Feb  3 11:36:46 1994  Jason Merrill  (jason@deneb.cygnus.com)
10644
10645         * decl.c (grokdeclarator): Don't complain about anonymous unions.
10646
10647         * cp-tree.h (TYPE_WAS_ANONYMOUS): This struct was originally
10648         anonymous, but had a name given to it by a typedef.
10649
10650         * decl.c (grokdeclarator): When renaming an anonymous struct, set
10651         TYPE_WAS_ANONYMOUS.
10652
10653         * decl2.c (constructor_name_full): Use TYPE_WAS_ANONYMOUS.
10654
10655         * cp-tree.h (DECL_UNDEFINED_FRIENDS): #if 0 out.
10656
10657         * init.c (xref_friend): Don't set up DECL_UNDEFINED_FRIENDS.
10658         (embrace_waiting_friends): Don't use DECL_UNDEFINED_FRIENDS.
10659         
10660         * decl.c (grokdeclarator): Set TYPE_NESTED_NAME properly on nested
10661         anonymous structs that get typedef'd.
10662
10663         * decl.c (grokdeclarator): Always return void_type_node for
10664         friends.
10665
10666         * error.c (dump_function_decl): Don't use DECL_CLASS_CONTEXT for
10667         friends.
10668         (dump_function_decl): Don't print out default args for
10669         a function used in an expression.
10670
10671         * decl.c (grokdeclarator): Give error on abstract declarator used
10672         in an invalid context (i.e. `void (*)();').
10673
10674         * error.c (cp_line_of): Support _TYPE nodes.
10675         (cp_file_of): Ditto.
10676
10677         * cvt.c (build_up_reference): Don't abort if passed a SAVE_EXPR;
10678         it can happen for the RHS of an assignment stmt where the LHS is
10679         a COND_EXPR.
10680
10681         * init.c (expand_aggr_init_1): Deal with bracketed initializer
10682         lists properly.
10683
10684         * class.c (finish_struct): Deal with enumerators and typedefs
10685         again.
10686
10687 Wed Feb  2 11:30:22 1994  Jason Merrill  (jason@deneb.cygnus.com)
10688
10689         * class.c (finish_struct): Tidy up loop over fields.
10690
10691         * errfn.c (cp_thing): Don't advance twice after a format.
10692
10693         * class.c (finish_struct): Complain about needing a constructor
10694         if a member has only non-default constructors, and don't try to
10695         generate a default constructor.
10696
10697         * decl.c (finish_decl): Also do the constructor thing if
10698         TYPE_NEEDS_CONSTRUCTING is set (for arrays).
10699
10700         * search.c (unuse_fields): New function: mark all fields in this
10701         type unused.
10702         (dfs_unuse_fields): Helper function.
10703
10704         * class.c (pushclass): If the new class is the same as the old
10705         class, still unuse the fields.
10706         (unuse_fields): Move to search.c.
10707
10708         * decl.c (grok_op_properties): Add friendp argument.
10709         (grokfndecl): Pass it.
10710         (start_method): Ditto.
10711
10712         * decl2.c (delete_sanity): Add use_global_delete parameter to catch
10713         ::delete calls.
10714
10715         * parse.y (unary_expr): Pass new parameter to delete_sanity.
10716
10717         * lex.c (default_copy_constructor_body): Don't choke if the union
10718         has no fields.
10719         (default_assign_ref_body): Ditto.
10720
10721         * call.c (compute_conversion_costs_ansi): Do the right thing for
10722         ellipsis matches.
10723
10724         * decl.c (push_to_top_level): Optimize.
10725
10726         * decl.c (start_function): Look for the lexical scope of a friend
10727         in DECL_CLASS_CONTEXT.
10728
10729         * init.c (do_friend): Set DECL_CLASS_CONTEXT on global friends.
10730
10731 Tue Feb  1 15:59:24 1994  Jason Merrill  (jason@deneb.cygnus.com)
10732
10733         * cp-tree.h (TREE_GETS_PLACED_NEW): New macro.
10734
10735         * init.c (init_init_processing): Don't assign BIN/BID to the
10736         IDENTIFIER_GLOBAL_VALUEs of their respective operators.
10737         (build_new): Check TREE_GETS_PLACED_NEW.
10738
10739         * decl.c (grok_op_properties): Don't set TREE_GETS_NEW for a decl of
10740         op new with placement, set TREE_GETS_PLACED_NEW.
10741
10742         * cp-tree.h (ANON_UNION_P): New macro.  Applies to decls.
10743
10744         * class.c (finish_struct): Don't treat anonymous unions like
10745         other aggregate members.  Do synthesize methods for unions without
10746         a name, since they may or may not be "anonymous unions".
10747
10748         * decl2.c (grok_x_components): Wipe out memory of synthesized methods
10749         in anonymous unions.
10750
10751         * lex.c (default_copy_constructor_body): Support unions.
10752         (default_assign_ref_body): Ditto.
10753
10754 Mon Jan 31 12:07:30 1994  Jason Merrill  (jason@deneb.cygnus.com)
10755
10756         * cp-tree.h: Fix documentation of LOOKUP_GLOBAL, add prototypes.
10757
10758         * error.c (args_as_string): New function (%A), like type_as_string
10759         except NULL_TREE -> "..."
10760
10761         * call.c (build_overload_call_real): Fix for new overloading.
10762
10763         * decl.c (grok_op_properties): Set all of the TYPE_OVERLOADS_* flags
10764         here.
10765
10766         * parse.y (operator_name): Instead of here.
10767
10768         * typeck2.c (build_functional_cast): Treat a TREE_LIST as a list
10769         of functions.
10770
10771         * call.c (build_overload_call_real): Support LOOKUP_SPECULATIVELY.
10772
10773         * method.c (build_opfncall): Don't need to massage return value
10774         any more, call build_overload_call with all flags.
10775
10776         * typeck.c (build_x_binary_op): Put back speculative call to
10777         build_opfncall.
10778         (build_x_unary_op): Ditto.
10779         (build_x_conditional_expr): Ditto.
10780
10781 Mon Jan 31 10:00:30 1994  Mike Stump  <mrs@cygnus.com>
10782
10783         * cvt.c (build_type_conversion_1): Change call to pedwarn into
10784         warning, and conditionalize upon warn_cast_qual.
10785
10786 Fri Jan 28 11:48:15 1994  Jason Merrill  (jason@deneb.cygnus.com)
10787
10788         * search.c (lookup_field): If xbasetype is a binfo, copy it to
10789         avoid clobbering its inheritance info.
10790
10791         * call.c (build_method_call): Don't overwrite basetype_path with
10792         TYPE_BINFO (inst_ptr_basetype) if they have the same type.
10793
10794         * search.c (compute_access): Fix handling of protected inheritance
10795         and friendship with the enclosing class.
10796
10797         * typeck2.c (store_init_value): Allow passing of TREE_CHAIN for
10798         initialization of arbitrary variable.
10799
10800         * typeck2.c (build_functional_cast): Only try calling a method if
10801         one exists.
10802
10803         * decl.c (grokdeclarator): Move handling of constructor syntax
10804         initialization into first loop for generality.
10805         (parmlist_is_random): Lose.
10806
10807         * lex.c (cons_up_default_function): Set TREE_PARMLIST on arguments
10808         to default function.
10809
10810 Thu Jan 27 19:26:51 1994  Jason Merrill  (jason@deneb.cygnus.com)
10811
10812         * decl.c (grokparms): Abort if we get called with something we don't
10813         expect.
10814
10815 Thu Jan 27 17:37:25 1994  Mike Stump  <mrs@cygnus.com>
10816
10817         * call.c (build_overload_call_real): Change argument complain to
10818         flags to match style of rest of code.  Pass it down to
10819         build_function_call_real as necessary.
10820         * call.c (build_overload_call, build_overload_call_maybe): Change
10821         argument complain to flags to match style of rest of code.
10822         * cp-tree.h (build_function_call_real): Added fourth flags
10823         argument.
10824         * cvt.c (convert_to_reference): Only give warning messages, if
10825         LOOKUP_COMPLAIN is set.
10826         * typeck.c (build_x_function_call): Change simple complain
10827         argument to build_overload_call_maybe and build_overload_call, to
10828         LOOKUP_COMPLAIN to match style of rest of code.
10829         * typeck2.c (build_functional_cast): Ditto.
10830         * typeck.c (build_function_call_real): Add flags, so that we can
10831         not complain, if we don't want to complain.  Complain about
10832         arguments, if we are complaining, otherwise don't.
10833         * typeck.c (build_function_call, build_function_call_maybe):
10834         Stick in flags argument.
10835         * typeck.c (build_x_binary_op, build_x_unary_op,
10836         build_x_conditional_expr, build_x_compound_expr): Follow style of
10837         build_x_indirect_ref, as it is more correct and more common.
10838
10839 Thu Jan 27 14:36:20 1994  Jason Merrill  (jason@deneb.cygnus.com)
10840
10841         * call.c (build_method_call): Don't check for being called with
10842         a pointer.
10843
10844         * decl2.c (finish_file): Don't play with DECL_CLASS_CONTEXT for the
10845         static initializer function.
10846
10847         * init.c (build_member_call): Use convert_force here, too.
10848
10849         * search.c (compute_access): Only treat static members specially
10850         if they are referenced directly.
10851
10852 Wed Jan 26 18:28:14 1994  Jason Merrill  (jason@deneb.cygnus.com)
10853
10854         * gxxint.texi (Access Control): New node.
10855
10856         * search.c (current_scope): New function; returns whichever of
10857         current_class_type and current_function_decl is the most nested.
10858         (compute_access): Total overhaul to make it clearer and more
10859         correct.  Don't use the cache for now; in the only situation where
10860         it was used before, it gained nothing.  This frees up three of the
10861         DECL_LANG_FLAGs for possible other use!
10862
10863         * cp-tree.h: #if 0 out DECL_PUBLIC & friends.
10864
10865         * typeck.c (build_component_ref_1): Don't check DECL_PUBLIC.
10866
10867         * call.c (build_method_call): Use convert_force to cast `this' --
10868         rely on the access checking for the method itself.
10869
10870         * init.c (is_friend): Do the nesting thing, handle types.  I am
10871         my own friend.
10872         (is_friend_type): Become a shell for is_friend.
10873         (add_friend): Never stick in ctype.
10874         Why are the friendship functions in init.c, anyway?
10875
10876 Wed Jan 26 17:50:00 1994  Mike Stump  <mrs@cygnus.com>
10877
10878         * cvt.c (build_type_conversion_1): Don't conditionalize call to
10879         pedwarn upon pedantic.
10880
10881 Wed Jan 26 17:20:46 1994  Mike Stump  <mrs@cygnus.com>
10882
10883         * cvt.c (convert_to_reference): Add 8.4.3 checking so that one
10884         gets a warning if one tries to initialize a non-const & from a
10885         non-lvalue.
10886         * cvt.c (convert_to_reference): Use %P format for argument
10887         numbers in warnings.
10888
10889 Wed Jan 26 14:35:06 1994  Mike Stump  <mrs@cygnus.com>
10890
10891         * init.c (build_delete): Follow style in call.c to construct the
10892         virtual call to the desctructor, as that code is right.  Fixes a
10893         problem of the compiler saying a pointer conversion is ambiguous.
10894
10895 Wed Jan 26 11:28:14 1994  Jason Merrill  (jason@deneb.cygnus.com)
10896
10897         * cp-tree.h (VTABLE_NAME_P): Change other occurrence of
10898         VTABLE_NAME_FORMAT to VTABLE_NAME.
10899
10900         * *: s/visibility/access/g
10901
10902 Tue Jan 25 18:39:12 1994  Jason Merrill  (jason@deneb.cygnus.com)
10903
10904         * typeck.c (build_modify_expr): Don't smash references if INIT_EXPR.
10905
10906 Tue Jan 25 13:54:29 1994  Mike Stump  <mrs@cygnus.com>
10907
10908         * init.c (build_delete): Back out Jan 17th & 18th pacthes, as
10909         they break libg++.
10910
10911 Tue Jan 25 13:11:45 1994  Jason Merrill  (jason@deneb.cygnus.com)
10912
10913         * decl.c (duplicate_decls): Fix pointer arithmetic.
10914
10915 Mon Jan 24 15:50:06 1994  Chip Salzenberg  (chip@fin.uucp)
10916
10917             [ cp-* changes propagated from c-* changes in 940114 snapshot ]
10918             * cp-parse.y (maybe_attribute): Allow multiple __attribute__
10919             clauses on a declaration.
10920
10921 Mon Jan 24 17:06:23 1994  Jason Merrill  (jason@deneb.cygnus.com)
10922
10923         * class.c (finish_struct): Do synthesize methods for anon
10924         structs, just not unions.
10925
10926 Mon Jan 24 13:50:13 1994  Kung Hsu  (kung@mexican.cygnus.com)
10927
10928         * decl.c (xref_tag): handle anonymous nested type.
10929         * decl.c (globalize_nested_type): add no globalize bit check.
10930         * spew.c (hack_more_ids) : templated nested decl not push top
10931         level.
10932
10933         * parse.y : get rid of 'goto do_components'. It is much better
10934         for debugging.
10935
10936         * decl.c (is_anon_name): get rid of the function and use the
10937         macro ANON_AGGRNAME_P.
10938         * pt.c : ditto.
10939
10940 Fri Jan 21 14:06:02 1994  Jason Merrill  (jason@deneb.cygnus.com)
10941
10942         * class.c (finish_struct): Don't synthesize any methods for
10943         anonymous structs/unions.
10944
10945         * typeck.c (build_modify_expr): Don't treat pmf's as class objects.
10946
10947 Thu Jan 20 18:56:46 1994  Jason Merrill  (jason@deneb.cygnus.com)
10948
10949         * method.c (build_opfncall): Call build_indirect_ref on
10950         synthesized instance for operator delete.
10951
10952         * pt.c (type_unification): Don't abort if called with a list of
10953         types in ARGS.
10954
10955         * class.c (instantiate_type): Deal with function templates.
10956
10957 Thu Jan 20 16:55:35 1994  Jim Wilson  (wilson@sphagnum.cygnus.com)
10958
10959         * Makefile.in (CC): Default to cc not gcc.
10960
10961 Thu Jan 20 13:47:54 1994  Jason Merrill  (jason@deneb.cygnus.com)
10962
10963         * typeck.c (build_modify_expr): Call constructor if appropriate.
10964
10965         * decl.c (push_to_top_level): Clear out class-level bindings cache.
10966
10967 Wed Jan 19 13:51:22 1994  Jason Merrill  (jason@deneb.cygnus.com)
10968
10969         * call.c (resolve_scope_to_name): Work recursively (previously only
10970         looked down one level).
10971
10972         * lex.c (do_pending_inlines): If we're still dealing with the last
10973         batch of inlines, don't start working on a new one.
10974
10975         * Makefile.in (stamp-parse): Update conflict count.
10976         (TAGS): Fix.
10977
10978         * parse.y (explicit_instantiation): New rule; implements
10979         'template A<int>' syntax (though not 'template foo(int)' yet).
10980         (structsp): Add explicit_instantiation.
10981
10982 Tue Jan 18 13:53:05 1994  Jason Merrill  (jason@deneb.cygnus.com)
10983
10984         * class.c (finish_struct, etc.): Simplify decision to synthesize
10985         a destructor.
10986
10987         * call.c, class.c, cp-tree.h, decl.c, init.c,
10988         ptree.c, search.c, typeck.c, typeck2.c: Nuke
10989         TYPE_NEEDS_CONSTRUCTOR (change all calls to TYPE_NEEDS_CONSTRUCTING).
10990         * init.c (expand_aggr_init_1): Don't try non-constructor methods
10991         of initializing objects.
10992         (build_new): Don't try other methods if the constructor lookup fails.
10993
10994         * class.c (finish_base_struct): Set cant_have_default_ctor and
10995         cant_synth_copy_ctor properly.
10996         (finish_struct): Ditto.
10997
10998 Mon Jan 17 13:58:18 1994  Jason Merrill  (jason@deneb.cygnus.com)
10999
11000         * typeck.c (build_modify_expr_1): #if 0 out again.
11001         (build_modify_expr): #if 0 out memberwise init code again.
11002
11003         * lex.c (default_copy_constructor_body): Be const-correct.
11004         (default_assign_ref_body): Ditto.
11005
11006         * init.c (perform_member_init): Use TYPE_HAS_CONSTRUCTOR to decide
11007         whether or not to use it, rather than TYPE_NEEDS_CONSTRUCTING.
11008         (expand_aggr_init): Disable silent conversion from initializer list
11009         to list of args for a constructor.
11010
11011         * class.c (base_info): Lose needs_default_ctor.
11012         (finish_base_struct): Ditto.
11013         (finish_struct): Ditto.
11014
11015         * decl.c (init_decl_processing): Don't turn off flag_default_inline
11016         just because flag_no_inline is on.
11017         (finish_decl): Use TYPE_HAS_CONSTRUCTOR to decide to use
11018         constructor.
11019
11020         * class.c (finish_struct): Synthesize default ctor whenever
11021         allowed.
11022
11023         * Makefile.in (TAGS): Don't try to run etags on cp-parse.y.
11024
11025 Sat Jan 15 18:34:33 1994  Mike Stump  <mrs@cygnus.com>
11026
11027         * Makefile.in, configure: Handle the C++ front-end in a
11028         subdirectory.
11029         * cp-*: Move C++ front-end to cp/*.
11030
11031 Fri Jan 14 14:09:37 1994  Jason Merrill  (jason@deneb.cygnus.com)
11032
11033         * cp-typeck.c (build_function_call_real): Modify to match other
11034         instances of taking the address of the function.
11035
11036         * cp-class.c (finish_struct): Set TYPE_HAS_REAL_CONSTRUCTOR to 1 if
11037         there are non-synthesized constructors.
11038         Only set TYPE_NEEDS_CONSTRUCTOR if TYPE_HAS_REAL_CONSTRUCTOR.
11039         Always generate copy constructor if possible.
11040
11041         * cp-tree.h (lang_type): Add has_real_constructor bitfield.
11042         (TYPE_HAS_REAL_CONSTRUCTOR): Define.
11043
11044         * cp-lex.c (default_copy_constructor_body): Use init syntax
11045         for all bases.
11046
11047         * cp-type2.c (store_init_value): Only give error for initializer list
11048         if TYPE_HAS_REAL_CONSTRUCTOR.
11049
11050 Thu Jan 13 15:38:29 1994  Jason Merrill  (jason@deneb.cygnus.com)
11051
11052         * cp-tree.h (DECL_SYNTHESIZED): Add defn.
11053         (lang_decl): Add synthesized bitfield to decl_flags.
11054
11055         * cp-lex.c (cons_up_default_function): Use DECL_SYNTHESIZED to mark
11056         artificial methods, rather than a line # of 0.
11057
11058 Fri Jan 14 18:25:29 1994  Kung Hsu  (kung@mexican.cygnus.com)
11059
11060         * cp-decl (xref_tag): fix a bug in conflict type.
11061         * cp-parse.y : add SCOPED_NAME for uninstantiated template nested
11062         type reference.
11063         * cp-spew.c (yylex) : generated SCOPED_NAME token.
11064         * cp-lex.c (yyprint): handle SCOPED_NAME.
11065
11066 Fri Jan 14 17:00:29 1994  Mike Stump  <mrs@cygnus.com>
11067
11068         * cp-decl.c (pushdecl): Revert patch from Jan 11 19:33:03, as it is
11069         not right.
11070
11071 Thu Jan 13 14:00:35 1994  Kung Hsu  (kung@mexican.cygnus.com)
11072
11073         * cp-decl2.c (grok_x_components): fix a bug that enum type does not
11074         have type_flags.
11075
11076 Thu Jan 13 11:39:34 1994  Mike Stump  <mrs@cygnus.com>
11077
11078         Ensure that all vtable pointers are initialized with all the right
11079         values.
11080
11081         * cp-class.c (is_normal): Changed to reflect new meaning of
11082         CLASSTYPE_VFIELD_PARENT.
11083         * cp-class.c (maybe_fixup_vptrs): Use of
11084         CLASSTYPE_NEEDS_VIRTUAL_REINIT here is misguided.  Use
11085         BINFO_MODIFIED instead.
11086         * cp-class.c (finish_struct): Changed to reflect new meaning of
11087         CLASSTYPE_VFIELD_PARENT.
11088         * cp-decl.c (get_binfo_from_vfield): Removed, unneeded now.
11089         * cp-decl.c (finish_function): Use init_vtbl_ptrs, instead of open
11090         coding it here.
11091         * cp-init.c (init_vfields): Changed name to init_vtbl_ptrs, and
11092         re-implement.
11093         * cp-init.c (emit_base_init): Use new name init_vtbl_ptrs.
11094         * cp-tree.h (vfield_parent): Changed to integer.
11095         * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Changed docs to reflect new
11096         meaning.
11097         * cp-tree.h (init_vtbl_ptrs): Added init_vtbl_ptrs.
11098
11099 Wed Jan 12 18:24:16 1994  Kung Hsu  (kung@mexican.cygnus.com)
11100
11101         * cp-decl.c (xref_tag): re-implement globalize nested type.
11102         * cp-decl2.c (grok_x_components): ditto.
11103         * cp-parse.y: ditto.
11104         * cp-tree.h (lang_type): add no_globalize bit in type_flags.
11105
11106 Wed Jan 12 14:08:09 1994  Jason Merrill  (jason@deneb.cygnus.com)
11107
11108         * cp-decl.c (grokdeclarator): Don't set TREE_PUBLIC on friend
11109         decls with a definition attached.
11110
11111         * cp-typeck.c (build_modify_expr): Undo previous change in the case
11112         of INIT_EXPRs.
11113
11114 Tue Jan 11 19:33:03 1994  Jason Merrill  (jason@deneb.cygnus.com)
11115
11116         * cp-typeck.c (build_modify_expr): Replace code for generating
11117         assignment semantics for classes with an error.
11118         (build_modify_expr_1): #if 0 out.
11119
11120         * cp-decl.c (pushdecl): Patch bogus design of pushdecl
11121         behavior for overloaded functions (it doesn't push anything).
11122
11123         * cp-class.c (finish_struct): When generating default op=,
11124         set TYPE_HAS_ASSIGNMENT.
11125
11126 Mon Jan 10 18:48:06 1994  Mike Stump  <mrs@cygnus.com>
11127
11128         * cp-cvt.c (convert): Make {double, clashing enum} -> enum
11129         invalid.
11130         * cp-typeck.c (convert_for_assignment): Simplify.
11131         * cp-decl2.c (warn_enum_clash): Removed.
11132         * invoke.texi (-Wenum-clash): Removed.
11133         * toplev.c (-Wenum-clash): Removed.
11134
11135 Mon Jan 10 17:48:37 1994  Kung Hsu  (kung@mexican.cygnus.com)
11136
11137         * cp-decl.c (finish_decl): fix incorrect popclass call.
11138
11139         * cp-decl.c (is_anon_name): new function, check whether the name
11140         is anonymous name generated by compiler.
11141         * cp-decl.c (grokdeclarator): allow nested SCOPE_REF
11142         * cp-spew.c (hack_more_ids): handle nested type in template.
11143         * cp-parse.y : handle nested type reference in uninstantiated
11144         template.
11145         * cp-call.c (build_method_call): handle uninstantiated template
11146         case.
11147         * cp-pt.c (search_nested_type_in_tmpl): new function, search nested 
11148         type in template.
11149         * cp-pt.c (lookup_nested_type_by_name): new function, lookup nested 
11150         type by name.
11151         * cp-pt.c (tsubst): handle nested type search by name.
11152
11153 Mon Jan 10 14:32:18 1994  Jason Merrill  (jason@deneb.cygnus.com)
11154
11155         * cp-init.c (build_member_call): Propagate qualifiers to new type.
11156
11157         * cp-call.c (build_method_call): Count functions the new way.
11158
11159 Fri Jan  7 19:03:26 1994  Jason Merrill  (jason@deneb.cygnus.com)
11160
11161         * cp-decl.c (pushtag): Set DECL_ASSEMBLER_NAME for nested classes,
11162         too.
11163
11164 Tue Jan  4 16:45:51 1994  Kung Hsu  (kung@cirdan.cygnus.com)
11165
11166         * cp-parse.y: change to handle whether to globalize nested class.
11167         * cp-decl.c(xref_tag, maybe_globalize_type): Ditto.
11168
11169 Mon Jan  3 22:22:32 1994  Gerald Baumgartner  (gb@cygnus.com)
11170
11171         * Makefile.in cp-call.c cp-class.c cp-cvt.c cp-decl.c cp-decl2.c
11172         cp-error.c cp-init.c cp-lex.c cp-lex.h cp-method.c cp-parse.y
11173         cp-spew.c cp-tree.c cp-tree.h cp-type2.c cp-typeck.c cp-xref.c
11174         gplus.gperf toplev.c: Incorporated C++ signature extension.
11175         * cp-sig.c: New file, contains most of signature processing.
11176         * cp-hash.h: Regenerated from gplus.gperf.
11177
11178         * gcc.1 g++.1: Added explanation for  the `-fhandle-signatures'
11179         and `-fno-handle-signatures' command line flags.
11180
11181         * gcc.texi: Changed the last-modification date.
11182         * invoke.texi: Added `-fhandle-signatures' in the list of
11183         C++ language options.  Added explanation for this option.
11184
11185 Tue Dec 28 21:10:03 1993  Mike Stump  <mrs@cygnus.com>
11186
11187         * cp-init.c (expand_vec_init): Remove comptypes test, as it is too
11188         harsh here.
11189
11190 Tue Dec 28 13:42:22 1993  Mike Stump  <mrs@cygnus.com>
11191
11192         * cp-pt.c (do_pending_expansions): Decide to expand a template
11193         member function, based upon it's class type, not the class type of
11194         the first place it was declared.
11195
11196 Tue Dec 28 05:42:31 1993  Mike Stump  <mrs@cygnus.com>
11197
11198         * cp-class.c (is_normal): New routine, use to determine when the
11199         given binfo is the normal one.  (The one that should have the simple
11200         vtable name.)
11201         * cp-class.c (modify_other_vtable_entries): Use DECL_ASSEMBLER_NAME
11202         to check if two fndecls are `the same'.  Sometimes this routine can
11203         modify the main vtable, and normal should be 1, in that case, so use
11204         is_normal() to determine if this is the main vtable for the class.
11205         Don't recurse down virtual bases, as they are shared, and we take
11206         care of them elsewhere.
11207         * cp-class.c (modify_vtable_entries): If we have already updated the
11208         vtable with the new virtual, don't do it again.
11209         * cp-class.c (finish_struct): Set CLASSTYPE_VFIELD_PARENT as
11210         appropriate.  Do virtual function overriding in virtual bases, after
11211         normal overriding, so that the base function list in DECL_VINDEX is
11212         not overridden, before we have a chance to run through the list.
11213         Use DECL_ASSEMBLER_NAME to check if two fndecls are `the same'.
11214         Make sure we pass the right address into modify_vtable_entries.
11215         * cp-tree.h (CLASSTYPE_VFIELD_PARENT): New field to indicate which
11216         binfo is the one that has the vtable that we based our vtable on.
11217
11218 Fri Dec 24 09:40:52 1993  Michael Tiemann  (tiemann@blues.cygnus.com)
11219
11220         * cp-typeck.c (c_expand_start_case): Use default_conversion to
11221         convert expression from reference type if necessary.
11222
11223 Wed Dec 22 17:58:43 1993  Jason Merrill  (jason@deneb.cygnus.com)
11224
11225         * cp-typeck.c (build_unary_op): Make sure that it's a TREE_LIST before
11226         trying to read its TREE_VALUE.
11227
11228         * cp-class.c (finish_struct_methods): Clear DECL_IN_AGGR_P here.
11229         (finish_struct): Instead of here.
11230
11231 Tue Dec 21 14:34:25 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
11232
11233         * cp-tree.c (list_hash_lookup_or_cons): Make sure the type doesn't
11234         have TYPE_PTRMEMFUNC_P set before we try to build its
11235         CLASSTYPE_ID_AS_LIST.
11236         (get_decl_list): Likewise, when trying to read it.
11237
11238         * cp-tree.h (VTABLE_NAME): No def with NO_{DOLLAR,DOT} defined.
11239         (VTABLE_NAME_P): Use it instead of VTABLE_NAME_FORMAT.
11240
11241 Mon Dec 20 13:35:03 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
11242
11243         * cp-typeck.c (rationalize_conditional_expr): New function.
11244         (unary_complex_lvalue): Use it.
11245         (build_modify_expr): Use it, since trying to do an ADDR_EXPR of it
11246         with build_unary_op won't cut it.  Don't wrap the COND_EXPR with a
11247         SAVE_EXPR either.
11248
11249         * cp-decl2.c (explicit_warn_return_type): Deleted variable.
11250         (lang_decode_option): Set warn_return_type, not explicit_*, for
11251         -Wreturn-type and -Wall.  This is what rest_of_compilation uses to
11252         decide if it should go into jump_optimize or not.
11253         * cp-tree.h (explicit_warn_return_type): Deleted.
11254         * cp-decl.c (grokdeclarator): Use warn_return_type, not explicit_*.
11255         (finish_function): Also complain about no return in a non-void fn if
11256         we're being pedantic (don't rely on use of -Wreturn-type).
11257
11258 Fri Dec 17 15:45:46 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
11259
11260         * cp-decl.c (grokdeclarator): Forbid declaration of a function as
11261         static if it's being done inside another function.
11262
11263         * cp-search.c (compute_visibility): Check for friendship both ways.
11264
11265 Fri Dec 17 14:28:25 1993  Jason Merrill  (jason@deneb.cygnus.com)
11266
11267         * cp-cvt.c (build_default_binary_type_conversion): Make error
11268         messages more helpful.
11269
11270         * cp-error.c (op_as_string): New function, returns "operator =="
11271         given EQ_EXPR or suchlike.
11272
11273 Fri Dec 17 13:28:11 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
11274
11275         * cp-call.c (print_n_candidates): New function.
11276         (build_overload_call_real): Use it when we complain about a call
11277         being ambiguous.
11278
11279 Fri Dec 17 12:41:17 1993  Jason Merrill  (jason@deneb.cygnus.com)
11280
11281         * cp-call.c (build_method_call): Fix checking for static call
11282         context.
11283
11284         * cp-method.c (build_opfncall): Call build_indirect_ref on argument
11285         to operator new.
11286
11287         * cp-init.c (build_new): Don't mess with rval when building
11288         indirect ref.
11289
11290 Thu Dec 16 16:48:05 1993  Kung Hsu  (kung@cirdan.cygnus.com)
11291
11292         * cp-lex.c (default_assign_ref_body): add check when TYPE_NESTED_
11293         NAME(type) may not be exist. It's not a problem for old compiler.
11294
11295 Thu Dec 16 14:46:06 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
11296
11297         * cp-tree.h (CLASSTYPE_ALTERS_VISIBILITIES_P): Delete macro, it's
11298         never used for anything.
11299         (struct lang_type, member type_flags): Delete field
11300         `alters_visibility', and up `dummy' by 1.
11301         * cp-class.c (finish_base_struct): Delete code that copies the
11302         setting of CLASSTYPE_ALTERS_VISIBILITIES_P.
11303         (finish_struct): Delete code that sets it.
11304
11305 Thu Dec 16 14:44:39 1993  Jason Merrill  (jason@deneb.cygnus.com)
11306
11307         * cp-decl.c, cp-init.c, cp-typeck.c: Fix arguments to
11308         build_method_call that I messed up before.
11309
11310         * cp-search.c (get_base_distance): If protect > 1, allow immediate
11311         private base.
11312
11313         * cp-class.c (finish_base_struct): Set cant_synth_* correctly.
11314         (finish_struct): Ditto.  Well, nigh-correctly; it won't deal
11315         properly with the case where a class contains an object of an
11316         ambiguous base class which has a protected op=.  Should be fixed
11317         when the access control code gets overhauled.
11318         (finish_struct_methods): Set TYPE_HAS_NONPUBLIC_* correctly.
11319
11320 Thu Dec 16 12:17:06 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
11321
11322         * cp-lex.c (real_yylex): Turn the code back on that deals with
11323         __FUNCTION__ and __PRETTY_FUNCTION__.  Don't use lookup_name, to
11324         avoid the ambiguity problems that led to it being turned off in the
11325         first place.
11326
11327         * cp-method.c (hack_identifier): Also check for a TYPE_PTRMEMFUNC_P
11328         to see if something is a method.
11329
11330 Wed Dec 15 18:35:58 1993  Mike Stump  <mrs@cygnus.com>
11331
11332         * cp-typeck.c (build_modify_expr): Avoid error messages on small
11333         enum bit fields.
11334         * cp-typeck.c (convert_for_assignment): Add missing argument to
11335         cp_warning and cp_pedwarn calls.
11336
11337 Wed Dec 15 18:25:32 1993  Jason Merrill  (jason@deneb.cygnus.com)
11338
11339         * cp-parse.y (member_init): ANSI C++ doesn't forbid old-style base
11340         initializers; it's just anachronistic.
11341
11342         * cp-decl.c (finish_decl): Don't require external-linkage arrays
11343         to have a complete type at declaration time when pedantic.
11344
11345 Tue Dec 14 11:37:23 1993  Jason Merrill  (jason@deneb.cygnus.com)
11346
11347         * cp-decl.c (pushdecl): Don't set DECL_CONTEXT if it's already set.
11348
11349         * cp-call.c (build_method_call): Don't dereference pointer given
11350         as instance.
11351
11352         * cp-decl.c (finish_function): Don't pass pointer to
11353         build_method_call.
11354         (finish_function): Ditto.
11355
11356         * cp-typeck.c (build_x_function_call): Ditto.
11357
11358         * cp-method.c (build_component_type_expr): Ditto.
11359
11360         * cp-init.c (build_member_call): Ditto.
11361         (build_new): Ditto.
11362
11363 Mon Dec 13 18:04:33 1993  Kung Hsu  (kung@cirdan.cygnus.com)
11364
11365         * cp-decl.c (xref_tag): fix regression created by changes made 
11366         in Dec. 7 1993.
11367         * cp-decl.c (xref_defn_tag): fix parallel nested class problem.
11368
11369 Fri Dec 10 12:40:25 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
11370
11371         * cp-call.c (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print
11372         out the final evaluation of the function, so we can see if ELLIPSIS,
11373         USER, and EVIL were set at the end.
11374
11375         * cp-call.c (convert_harshness_ansi): When the parm isn't an lvalue,
11376         only go for setting TRIVIAL_CODE if we are dealing with types that
11377         are compatible.
11378
11379 Thu Dec  9 18:27:22 1993  Mike Stump  <mrs@cygnus.com>
11380
11381         * cp-decl.c (flag_huge_objects): New flag to allow large objects.
11382         * toplev.c (lang_options): Ditto.
11383         * cp-decl2.c (flag_huge_objects, lang_f_options): Ditto.
11384         * cp-decl.c (delta_type_node): New type for delta entries.
11385         * cp-tree.h (delta_type_node): Ditto.
11386         * cp-decl.c (init_decl_processing): Setup delta_type_node.
11387         * cp-decl.c (init_decl_processing, build_ptrmemfunc_type): Use
11388         delta_type_node instead of short_integer_type_node. 
11389         * cp-class.c (build_vtable_entry): Ditto.
11390
11391 Thu Dec  9 16:19:05 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
11392
11393         * cp-tree.h (OPERATOR_TYPENAME_P): Define outside of
11394         NO_{DOLLAR,DOT} macro checks, so it always gets defined.
11395         (VTABLE_NAME_P): Define for NO_DOT && NO_DOLLAR_IN_LABEL.
11396
11397 Wed Dec  8 17:38:06 1993  Mike Stump  <mrs@cygnus.com>
11398
11399         * cp-decl.c (finish_decl): Make sure things that can go into
11400         "common", do go into common, if -fcommon is given.
11401
11402 Wed Dec  8 13:01:54 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
11403
11404         * cp-call.c (print_harshness) [DEBUG_MATCHING]: New function.
11405         (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print out
11406         argument matching diagnostics to make instantly clear what the
11407         compiler is doing.
11408
11409         * cp-call.c (convert_harshness_ansi): If the parm isn't an lvalue,
11410         then check to see if the penalty was increased due to
11411         signed/unsigned mismatch, and use a TRIVIAL_CODE if it wasn't.
11412
11413 Tue Dec  7 18:29:14 1993  Kung Hsu  (kung@cirdan.cygnus.com)
11414
11415         * cp-decl.c (xref_tag, pushtag): Fix nested class search/resolution
11416         problem.
11417
11418 Tue Dec  7 16:09:34 1993  Jason Merrill  (jason@deneb.cygnus.com)
11419
11420         * cp-class.c (finish_struct): Before synthesizing methods, if no
11421         methods have yet been declared then set nonprivate_method.  Don't
11422         set non_private method after synthesizing a method.
11423
11424         * cp-lex.c (extract_interface_info): If flag_alt_external_templates
11425         is set, tie emitted code to the location of template instantiation,
11426         rather than definition.
11427
11428         * cp-tree.h: Declare flag_alt_external_templates.
11429
11430         * cp-decl2.c (lang_decode_option): Support -falt-external-templates.
11431
11432         * toplev.c (lang_options): Ditto.
11433
11434 Mon Oct  4 12:50:02 1993  Chip Salzenberg  (chip@fin.uucp)
11435
11436         [changes propagated from 930810 snapshot]
11437         * cp-decl.c (init_decl_processing): Make long long available for use
11438         as SIZE_TYPE and PTRDIFF_TYPE.
11439         (finish_decl): Allow file-scope static incomplete array.
11440         (grokdeclarator): Don't pass on const and volatile fron function
11441         value type to function type.
11442         Warn here for volatile fn returning non-void type.
11443         * cp-parse.y (attrib): Accept attributes `volatile' with alias
11444         `noreturn', and `const'.
11445         * cp-typeck.c (default_conversion): Don't lose const and volatile.
11446         (build_binary_op_nodefault): Generate pedantic warning for comparison
11447         of complete pointer type with incomplete pointer type.
11448         (build_c_cast): Be careful that null pointer constant be INTEGER_CST.
11449
11450 Tue Dec  7 10:46:48 1993  Jason Merrill  (jason@deneb.cygnus.com)
11451
11452         * cp-init.c (expand_vec_init): When creating a temporary for copying
11453         arrays, use the type of the source, not the target.
11454
11455         * cp-cvt.c (convert): Pass an argument for errtype to
11456         convert_to_reference.
11457
11458         * cp-error.c (dump_expr, COMPONENT_REF & CALL_EXPR): Deal with
11459         methods, -> and `this'.
11460
11461 Mon Dec  6 17:12:33 1993  Jason Merrill  (jason@deneb.cygnus.com)
11462
11463         * cp-error.c (parm_as_string): New function; returns `this' or arg
11464         number.  Corresponds to %P.
11465         (dump_expr): Deal with method calls.
11466
11467         * cp-cvt.c (convert_to_reference): Stop using warn_for_assignment.
11468         * cp-typeck.c (convert_for_assignment): Ditto.
11469         (warn_for_assignment): Lose.
11470
11471 Mon Dec  6 11:33:35 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
11472
11473         * cp-call.c (ideal_candidate_ansi): Delete code that was never
11474         doing anything useful.  Instead, sort once, and DO NOT wipe
11475         out any codes with EVIL_CODE, since that's what we use as a
11476         marker for the end of the list of candidates.
11477
11478         * cp-cvt.c (convert_to_aggr): Make sure to always set H_LEN.
11479
11480 Mon Dec  6 12:49:17 1993  Jason Merrill  (jason@deneb.cygnus.com)
11481
11482         * cp-init.c (get_aggr_from_typedef): New function, like
11483         is_aggr_typedef but returns the _TYPE.
11484
11485         * cp-call.c, cp-init.c, cp-method.c: Eradicate err_name.
11486
11487 Sun Dec  5 18:12:48 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
11488
11489         * cp-lex.c (readescape): Pedwarn when a hex escape is out of range.
11490
11491 Thu Nov 25 23:50:19 1993  Chip Salzenberg  (chip@fin.uucp)
11492
11493         Delay language context change until beginning of next decl.
11494
11495         * cp-lex.h (c_header_level): Removed.
11496         (pending_lang_change): Declared.
11497         * cp-lex.c (c_header_level): Renamed from in_c_header, made static.
11498         (pending_lang_change): Defined.
11499         (check_newline): Rework code that recognizes line number and
11500         filename changes.  Instead of pushing and popping lang context,
11501         increment and decrement pending_lang_change.
11502         (do_pending_lang_change):  Push and pop lang context according
11503         to value of pending_lang_change.
11504         * cp-parse.y (extdefs): Use lang_extdef instead of extdef.
11505         (extdef): Same as extdef, but call do_pending_lang_change() first.
11506
11507 Mon Nov 15 15:39:15 1993  Chip Salzenberg  (chip@fin.uucp)
11508
11509         * cp-typeck.c (build_binary_op_nodefault): Warn for ordered
11510         compare of ptr with 0 only if pedantic in both cases.
11511
11512 Thu Nov 25 13:31:37 1993  Chip Salzenberg  (chip@fin.uucp)
11513
11514         Reinstate the below patch, which got lost in the Cygnus merge:
11515         Tue Nov 23 13:59:24 1993  Hallvard B Furuseth  (hbf@durin.uio.no)
11516         * cp-parse.y (maybe_type_qual): Don't fail to set $$.
11517
11518 Wed Nov 17 19:03:30 1993  Chip Salzenberg  (chip@fin.uucp)
11519
11520         * cp-parse.y (attrib): Allow "ident(ident)" like the C front end.
11521
11522 Fri Oct 22 20:43:37 1993  Paul Eggert  (eggert@twinsun.com)
11523
11524         * cp-lex.c (real_yylex): Diagnose floating point constants
11525         that are too large.
11526
11527 Wed Nov 17 19:10:37 1993  Chip Salzenberg  (chip@fin.uucp)
11528
11529         * cp-type2.c (build_functional_cast): ARM page 16: When a class
11530         and an object, function or enumerator are declared in the same
11531         scope with the same name, the class name is hidden.
11532
11533 Wed Nov 17 19:07:18 1993  Chip Salzenberg  (chip@fin.uucp)
11534
11535         * cp-call.c (convert_harshness_ansi): Distinguish float, double,
11536         and long double from each other when overloading.
11537         (compute_conversion_costs_{ansi,old}, build_method_call,
11538         build_overlay_call_real, convert_to_aggr): Always set and
11539         always use H_LEN member of candidate structure.
11540
11541 Mon Oct 11 23:10:53 1993  Chip Salzenberg  (chip@fin.uucp)
11542
11543         * cp-decl.c (duplicate_decls): Note redeclarations of library
11544         functions, and generate distinct warnings for them.
11545
11546 Mon Oct  4 12:26:49 1993  Chip Salzenberg  (chip@fin.uucp)
11547
11548         Support format warnings in G++.
11549
11550         * cp-tree.h: Protect against multiple inclusion.
11551         Declare all public functions in c-common.c (copy from c-tree.h).
11552         (STDIO_PROTO): Define.
11553         (warn_format): Declare.
11554         (record_format_info): Remove declaration.
11555         * cp-decl.c (init_decl_processing): Call init_function_format_info.
11556         * cp-decl2.c (lang_decode_option): Make "-Wall" include warn_format.
11557         * cp-typeck.c (build_function_call_real): Call check_function_format.
11558         (record_format_info): Remove -- obsolete stub.
11559
11560 Sat Jul 24 12:04:29 1993  Chip Salzenberg  (chip@fin.uucp)
11561
11562         * cp-decl.c (duplicate_decls): Don't warn for non-extern var decl
11563         following an extern one (for -Wredundant-decls).
11564         * cp-parse.y (primary): In statement expression case, if compstmt
11565         returns something other than a BLOCK, return it unchanged.
11566
11567 Thu Dec  2 20:44:58 1993  Chip Salzenberg  (chip@fin.uucp)
11568
11569         * cp-decl.c (warn_extern_redeclared_static): New function made
11570         from code extracted from pushdecl.
11571         (duplicate_decls, pushdecl): Call new function.
11572         (lookup_name_current_level): Allow for IDENTIFIER_GLOBAL_VALUE
11573         to be a TREE_LIST when function is declared in 'extern "C" {}'.
11574
11575 Fri Dec  3 16:01:10 1993  Jason Merrill  (jason@deneb.cygnus.com)
11576
11577         * cp-class.c (duplicate_tag_error): Use cp_error.
11578         (finish_base_struct): Check for ambiguity with direct base, and don't
11579         generate op= or copy ctor if it exists.
11580
11581 Fri Dec  3 15:32:34 1993  Kung Hsu  (kung@cirdan.cygnus.com)
11582
11583         * cp-init.c (expand_member_init): when initializer name is null,
11584         don't try to build it now because emit_base_init will handle it.
11585
11586 Fri Dec  3 12:28:59 1993  Jason Merrill  (jason@deneb.cygnus.com)
11587
11588         * cp-lex.c (init_lex): Initialize input_filename to "<internal>" for
11589         code such as ExceptionHandler::operator=.
11590
11591 Fri Dec  3 10:32:08 1993  Jason Merrill  (jason@deneb.cygnus.com)
11592
11593         * cp-decl.c (grokdeclarator): Don't try to print out dname when
11594         complaining about arrays of references if decl_context==TYPENAME,
11595         since it will be null.
11596
11597         * cp-decl2.c: Default to flag_ansi_overloading.
11598
11599 Thu Dec  2 18:05:56 1993  Kung Hsu  (kung@cirdan.cygnus.com)
11600
11601         * cp-call.c (build_method_call): use binfo from instance if it's
11602         different from binfo (basetype_path) passed from above.
11603
11604 Thu Dec  2 12:48:36 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
11605
11606 Wed Nov 17 19:14:29 1993  Chip Salzenberg  (chip@fin.uucp)
11607
11608         cp-error.c (dump_expr): Use unsigned chars to output a
11609         TREE_REAL_CST in hex.
11610
11611 Thu Dec  2 11:05:48 1993  Jason Merrill  (jason@deneb.cygnus.com)
11612
11613         * cp-class.c (finish_struct): Fix typo in setting
11614         cant_synth_asn_ref.
11615
11616         * cp-tree.h (TYPE_NESTED_NAME): New macro, does
11617         DECL_NESTED_TYPENAME (TYPE_NAME (NODE)).
11618
11619         * cp-lex.c (default_copy_constructor_body): Change
11620         DECL_NAME (TYPE_NAME (btype)) to TYPE_NESTED_NAME (btype).
11621         (default_assign_ref_body): Ditto.
11622         (default_copy_constructor_body): Call operator= explicitly for
11623         base classes that have no constructor.
11624
11625 Thu Dec  2 10:47:15 1993  Michael Tiemann  (tiemann@blues.cygnus.com)
11626
11627         * cp-call.c (build_method_call): If the instance variable is
11628         converted to error_mark_node when we're trying to convert it to the
11629         base type of a method we're looking up, return error_mark_node.
11630
11631 Thu Dec  2 10:41:16 1993  Torbjorn Granlund  (tege@cygnus.com)
11632
11633         * cp-typeck.c (build_binary_op_nodefault): In *_DIV_EXPR *_MOD_EXPR
11634         cases, tests for unsigned operands by peeking inside a NOP_EXPR.
11635
11636 Wed Dec  1 13:33:34 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
11637
11638         * cp-call.c (compute_conversion_costs_ansi): Use the size of struct
11639         harshness_code, not the size of short, for clearing out the
11640         ansi_harshness.
11641
11642         * cp-call.c (print_candidates): New function.
11643         (build_method_call): When we had some candidates, but didn't get a
11644         usable match, don't report that we got an error with the first
11645         candidate.  Instead, say there were no matches, and list the
11646         candidates with print_candidates.  In the second pass, make sure we
11647         clear out ever_seen, so we can accurately count the number of
11648         functions that qualified.
11649
11650 Wed Dec  1 09:53:59 1993  Torbjorn Granlund  (tege@cygnus.com)
11651
11652         * cp-typeck.c (build_binary_op_nodefault): Shorten for *_MOD_EXPR
11653         only if op1 is known to be != -1.
11654         (build_binary_op_nodefault): Handle *_DIV_EXPR likewise.
11655
11656 Tue Nov 30 14:07:26 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
11657
11658         * cp-method.c (hack_identifier): If the field itself is private, and
11659         not from a private base class, say so.
11660
11661 Mon Nov 29 03:00:56 1993  Jason Merrill  (jason@deneb.cygnus.com)
11662
11663         * cp-decl.c (grokdeclarator): Always warn on initialization of
11664         const member.
11665
11666 Wed Nov 24 00:49:35 1993  Jason Merrill  (jason@deneb.cygnus.com)
11667
11668         * cp-class.c (finish_struct): Set TYPE_GETS_CONST_* properly.
11669         (finish_base_struct): Set cant_synth_asn_ref properly.
11670
11671         * cp-lex.c (cons_up_default_function): Add section for operator=.
11672         (default_assign_ref_body): New function, mostly cribbed from
11673         default_copy_constructor_body.
11674
11675         * cp-class.c (base_info): Add members cant_synth_copy_ctor,
11676         cant_synth_asn_ref, no_const_asn_ref.
11677         (finish_base_struct): Update no_const_asn_ref, note that you should
11678         update cant_synth_*, propagate TYPE_GETS_ASSIGN_REF.
11679         (finish_struct): Add decls for cant_synth_*, no_const_asn_ref, and
11680         initialize them properly.  Set no_const_asn_ref properly.  Set
11681         cant_synth_* in some of the situations where they should be set.
11682         Propagate TYPE_GETS_ASSIGN_REF.  Use cant_synth_copy_ctor.  Add call
11683         to cons_up_default_function for operator=.
11684
11685 Tue Nov 23 20:24:58 1993  Mike Stump  <mrs@cygnus.com>
11686
11687         * cp-cvt.c (convert_force): Add code to perform casting of pointer
11688         to member function types.
11689         * cp-typeck.c (build_ptrmemfunc): Add FORCE parameter to indicate
11690         when the conversion should be done, regardless.
11691         * cp-tree.h (build_ptrmemfunc): Ditto.
11692         * cp-type2.c (digest_init): Ditto.
11693         * cp-typeck.c (convert_for_assignment): Ditto.
11694
11695 Tue Nov 23 18:06:58 1993  Jason Merrill  (jason@deneb.cygnus.com)
11696
11697         * cp-error.c (dump_expr): Do the right thing for variables of
11698         reference type.
11699
11700         * cp-decl.c (grok_op_properties): Set TYPE_HAS_ASSIGN_REF
11701         and its kin properly.
11702         (xref_tag): Propagate TYPE_GETS_ASSIGN_REF.
11703
11704 Tue Nov 23 12:26:13 1993  Mike Stump  <mrs@cygnus.com>
11705
11706         * cp-method.c (build_opfncall): Don't count pointer to member
11707         functions as aggregates here, as we don't want to look up methods in
11708         them.  The compiler would core dump if we did, as they don't have
11709         normal names.
11710         * cp-typeck.c (build_indirect_ref): Improve wording on error
11711         message.
11712
11713 Mon Nov 22 14:22:23 1993  Jason Merrill  (jason@deneb.cygnus.com)
11714
11715         * cp-decl.c (grok_op_properties): Allow operator?: with pedwarn
11716         (since it's supported in other compiler bits).
11717
11718         * cp-method.c (report_type_mismatch): Use cp_error; ignore err_name
11719         argument.
11720
11721         * cp-error.c (dump_function_decl): Don't print return type for
11722         constructors and destructors.
11723
11724         * cp-cvt.c (cp_convert_to_pointer): Import code from
11725         convert_to_pointer so we can return error_mark_node in the case of an
11726         error, and to allow more meaningful error messages.
11727         (build_type_conversion): Don't go through void* when trying
11728         to convert to a pointer type.
11729
11730         * cp-decl.c (grokfndecl): Move call to grok_op_properties back
11731         after grokclassfn so that it's dealing with the right decl.
11732         (grok_op_properties): Don't assert !methodp for op new and op delete.
11733
11734         * cp-init.c (build_delete): Don't use TYPE_BUILT_IN (there are now
11735         no uses of it in the compiler).
11736
11737         * cp-call.c (build_scoped_method_call): Fix for destructors of simple
11738         types.
11739         (build_method_call): Ditto.
11740
11741 Fri Nov 19 12:59:38 1993  Jason Merrill  (jason@deneb.cygnus.com)
11742
11743         * cp-tree.c (count_functions): Abstraction function.
11744
11745         * cp-call.c (build_overload_call_real): Deal with new overloading
11746         properly, remove dead code.
11747
11748         * gcc.c (default_compilers): Generate and use .ii files in the
11749         intermediate stage of compiling C++ source.
11750
11751 Fri Nov 19 11:26:09 1993  Jim Wilson  (wilson@sphagnum.cygnus.com)
11752
11753         * cp-expr.c (cplus_expand_expr): Make call_target a valid memory
11754         address before using it, so it can be later safely compared.
11755
11756 Fri Nov 12 15:30:27 1993  Jason Merrill  (jason@deneb.cygnus.com)
11757
11758         * cp-pt.c (tsubst): Deal with new overloading.
11759
11760         * cp-typeck.c (fntype_p): is the arg function type?
11761         (comp_target_parms): pedwarn on conversion from (anything) to (...).
11762         (build_x_function_call): Deal with new overloading.
11763
11764         * cp-tree.c (decl_list_length): Deal with new overloading.
11765         (decl_value_member): Like value_member, but for DECL_CHAINs.
11766
11767         * cp-decl.c (duplicate_decls): Deal with new overloading.
11768         (start_decl): Ditto.
11769
11770         * cp-class.c (instantiate_type): Deal with new overloading.
11771
11772         * cp-call.c (convert_harshness_ansi): Deal with new overloading.
11773         (convert_harshness_old): Deal with new overloading.
11774         (build_overload_call_real): Ditto.
11775
11776 Mon Nov  8 13:50:49 1993  Jason Merrill  (jason@deneb.cygnus.com)
11777
11778         * cp-tree.c (get_unique_fn): New function; returns FUNCTION_DECL
11779         if unambiguous, NULL_TREE otherwise.
11780         (get_first_fn): Returns the first appropriate FUNCTION_DECL.
11781         (is_overloaded_fn): Returns whether or not the passed tree is
11782         a function or list of functions.
11783
11784         * cp-init.c (init_init_processing): use `get_first_fn' to find
11785         the FUNCTION_DEFN for new and delete.
11786
11787         * cp-decl.c (push_overloaded_decl): Use new overloading strategy, cut
11788         code size in half (I spit on special cases).
11789
11790 Tue Sep  7 20:03:33 1993  Jason Merrill  (jason@deneb.cygnus.com)
11791
11792         * cp-decl.c: Allow references and template type parameters as well