Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ut-sally!husc6!mit-eddie!rutgers!princeton!allegra!ulysses!mhuxt!ihnp4!houxm!mtuxo!mtune!mtunf!mtx5c!mtx5d!mtx5a!mat From: mat@mtx5a.UUCP Newsgroups: comp.lang.c Subject: Re: My comments to X3J11 (1000 lines) Message-ID: <1725@mtx5a.UUCP> Date: Tue, 13-Jan-87 13:45:41 EST Article-I.D.: mtx5a.1725 Posted: Tue Jan 13 13:45:41 1987 Date-Received: Thu, 15-Jan-87 19:55:37 EST References: <2144@brl-adm.ARPA> Organization: AT&T Information Systems, Middletown, NJ 07748-4801. Lines: 37 > These are comments I'm about to mail to CBEMA: > > I have implemented what I believe is a complete freestanding > implementation of this draft, except for the insuperable problem > described in item 1, ... > > Disastrous Deficiencies. > > ... > Support for arbitrary casts and arithmetic in static initializers > also requires changes to linkers. Consider > > int foo = ((int)&bar * 3) % 5001 | (int)&baz; > > The Rationale in 3.4 suggests that this initial value be computed and > installed at run time. However, this is usually impossible. Just > generating instructions to compute the value and store it is easy; the > problem is how to cause them to be executed at a suitable time. The > value of `foo' could be examined by code in a different source file > before any function in this source file has been called. Only a > special linker feature would make it possible for each separate > compilation to specify code to be executed before `main' is called. This is the problem faced by C++ in dealing with ``static constructors.'' Solutions are being found; they are generally dependent upon the machine environment, but the problem is not insurmountable, at least on the machines that C++ has thus far been ported to. I suspect that there is even a solution for the HP3000, and that is a bad machine to write language systems for (the linker must be a trusted program to protect the system.) -- from Mole End Mark Terribile (scrape .. dig ) mtx5b!mat (Please mail to mtx5b!mat, NOT mtx5a! mat, or to mtx5a!mtx5b!mat) (mtx5b!mole-end!mat will also reach me) ,.. .,, ,,, ..,***_*.