OSDN Git Service

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