From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.ada Subject: Re: Record initialisation question Date: Thu, 14 Jan 2021 08:59:04 -0800 Organization: A noiseless patient Spider Message-ID: <87ft33bgkn.fsf@nightsong.com> References: <5ff9779d$0$24281$426a74cc@news.free.fr> <5ffb311f$0$16185$426a74cc@news.free.fr> <5ffb7135$0$24247$426a74cc@news.free.fr> <5ffc8efd$0$8957$426a74cc@news.free.fr> <60004212$0$13563$426a34cc@news.free.fr> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="804d2f42cd413a54c252bd318cb8f49b"; logging-data="1727"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18/dfVl7+uU3G+pCQU/8FW9" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cancel-Lock: sha1:wykbWLMZ9OX8gZabYec9dt176DY= sha1:LgPyJ5ZYLuk5P+y1pyTR3sOhMT0= Xref: reader02.eternal-september.org comp.lang.ada:61132 List-Id: Niklas Holsti writes: > Do you (or someone) know if the C language standard guarantees that > such initializations will be done by the linker, and not by the C > start-up code that is analogous to Ada elaboration code? I don't remember it being required by the standard, but I remember there was some pain in the standardization process trying to make those kinds of address initializations flexible while still being doable at link time. The original proposal had fancier capabilities than the final standard did, because during discussions it emerged that the fancy features couldn't straightforwardly be implemented with the linkers that people expected to use.