Path: csiph.com!feeder.erje.net!2.eu.feeder.erje.net!news.swapon.de!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Toy code for currency handling Date: Wed, 24 Jan 2018 11:40:35 -0800 Organization: None to speak of Lines: 35 Message-ID: References: <_u%VB.198174$pG.159657@fx18.am4> <87k1xymuhl.fsf@bsb.me.uk> <92115d86-d5df-4cf5-afe6-37379ec575d1@googlegroups.com> <338154ad-7743-4673-8e1c-b644c1cc4cbb@googlegroups.com> <3f4603c1-8d53-4b06-9221-c0fb22be4b6c@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="9b033246d2c26c49dfac7ae22d8027bc"; logging-data="27441"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/xc+Wj0A5Tvx1eg5Kpp1fX" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:jgsBYmFHTBDvhkTSHpG38YgRa1s= sha1:4eFb/Oj5SHK3yVk4m4wFX0Hbl38= Xref: csiph.com comp.lang.c:125718 supercat@casperkitty.com writes: > On Wednesday, January 24, 2018 at 9:02:21 AM UTC-6, Jorgen Grahn wrote: >> Are there still any linkers like that? I remember people getting rid >> of them in the 1980s. Also, doesn't ISO C require better linkers >> since at least C99? > > ISO C requires that the an implementation support longer names with external > objects. That does not necessarily imply a linker that can handle such names. > An implementation which is limited to 676 compilation units, each of which > exports no more than 10,000 symbols, could uphold the C Standard even on a > system that limits symbols to six alphanumeric characters by using a two- > stage build process. During stage 1, the compiler which processes each > unit would be given a unique two-letter identifier for that unit and produce > a list of all exported symbols along with labels containing its two-letter > identifier and an index (e.g. if unit AQ exports 150 symbols, they would be > labeled AQ0000-AQ0149). All such lists could be concatenated and made > available to the compiler for stage 2, where it would actually generate > code which would use six-character names supported by the linker. Meanwhile, out here in the real world, are there any linkers currently used by any C compilers that do not support identifiers of at least 31 characters as required by N1570 5.2.4.1? No doubt a conforming C99 or C11 compiler *could* be made to work with a more limited linker, but as far as I know there's simply no need to worry about it. As usual, I expect you'll go off on yet another tangent and ignore any direct questions. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"