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 14:29:34 -0800 Organization: None to speak of Lines: 39 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> <18b92e29-acae-4e1f-abfd-9766a2f65c5f@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="9b033246d2c26c49dfac7ae22d8027bc"; logging-data="610"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19TFrRMbN1bKx64xii2+boF" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:ISil4WPpH2ysCW4LAWOSqueDfNw= sha1:YCQY2dL39IGeOXO25k61AVy3DWo= Xref: csiph.com comp.lang.c:125726 supercat@casperkitty.com writes: > On Wednesday, January 24, 2018 at 1:40:53 PM UTC-6, Keith Thompson wrote: >> 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. > > If no such linkers existed, why would the Standard need to mandate any > particular number? I would think it obvious that if a linker would support > external names of N characters, a quality implementation targeting that > linker should do likewise, at least up to its limit for internal names. > The only situation in which the Standard's mandate could have an effect > would be in cases where supporting external names of 31 characters would > otherwise be difficult. Many of the numeric limits specified in the standard are, I think, intended to discourage setting any fixed limits at all. The easiest way to meet the requirement for 31 significant initial characters is not to impose a fixed limit. Even for linkers that impose a fixed limit, the C standard's requirement encourages implementers to make the limit no less than 31 characters, just to make the compiler's job easier. I infer from your failure to answer my question that you don't know of any such linkers (you could have said so several responses ago). But that's ok; Robert Wessel has cited an example (the linker for zVSE, an IBM mainframe OS, which only supports 8-character names). Even there, the workaround is to use an automated tool on the object files to map long names to shortened encoded names, not, as you suggested, to force the programmer to invent such names. -- 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"