Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #83725
| From | Tim Rentsch <tr.17687@z991.linuxsc.com> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: g++ and linking |
| Date | 2022-04-25 07:19 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <86bkwp8cu4.fsf@linuxsc.com> (permalink) |
| References | <nuidnQ-AaOJpFXb8nZ2dnUU7-LfNnZ2d@giganews.com> <ssgfss$69l$1@dont-email.me> <ZURGJ.300299$qz4.140317@fx97.iad> <86wnielipg.fsf@linuxsc.com> <206e9608-9929-4652-a7f1-0b43f1069896n@googlegroups.com> |
"james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> writes: > On Tuesday, February 1, 2022 at 10:18:25 AM UTC-5, Tim Rentsch wrote: > >> Richard Damon <Ric...@Damon-Family.org> writes: >> >> [...] >> >>> The early versions of the standard, while not limiting identifier >>> length, does limit the 'significant' length for external identifiers, >>> allowing the implementation to truncate the name of the symbol in the >>> output to the linker. >>> >>> In C99, 6.4.2.1p5 makes that length Implementation Defined. I would >>> have to search to see if somewhere there is a guarantee of a minimum >>> value for this length >> >> Section 5.2.4.1 paragraph 1 says > > "The implementation shall be able to translate and execute at > least one program that contains at least one instance of every one > of the following limits:" > >> 63 significant initial characters in an internal identifier >> or a macro name >> >> 31 significant initial characters in an external identifier > > Keep in mind that these are NOT minimum permitted values for the > maximum number of significant characters in an identifier (the > so-called minimum maximum that I heard a lot about when C90 first > came out). Strictly speaking, the only requirement that they > impose is on the "one program". It is not a requirement that the > implementation treat that many characters as significant if they > occur in any other program I think you're just wrong about that. Clearly the intended reading of section 5.2.4, and how essentially everyone else reads this section, is that 5.2.4.1 paragraph 1 gives minimum translation limits, and also requires all conforming implementations to be able to translate *and execute* a program that has at least one instance of each of the minimums. Conversely, any programming language standard that does not give a requirement for minimum supported identifier length would be grossly negligent. So it would be quite astonishing to interpret 5.2.4.1 paragraph 1 as giving minimums that apply to just the one program rather than stating minimum requirements that apply to the implementation generally. >> By the way I think you mean requirement rather than guarantee. > > A requirement that must be met by an implementation of a language in > order to qualify as conforming to a given standard also serves as a > guarantee that anything that does qualify as conforming > implementation of that language meets that requirement. It is not a guarantee in the usual sense of the word guarantee. And even if it were, it's a pointless observation.
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
g++ and linking Joseph Hesse <joeh@gmail.com> - 2022-01-22 06:32 +0200
Re: g++ and linking "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2022-01-22 09:39 +0100
Re: g++ and linking Richard Damon <Richard@Damon-Family.org> - 2022-01-22 06:30 -0500
Re: g++ and linking David Brown <david.brown@hesbynett.no> - 2022-01-22 12:53 +0100
Re: g++ and linking Bonita Montero <Bonita.Montero@gmail.com> - 2022-01-22 16:45 +0100
Re: g++ and linking Richard Damon <Richard@Damon-Family.org> - 2022-01-22 11:13 -0500
Re: g++ and linking Bonita Montero <Bonita.Montero@gmail.com> - 2022-01-22 19:00 +0100
Re: g++ and linking Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-02-01 07:17 -0800
Re: g++ and linking "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2022-02-01 08:19 -0800
Re: g++ and linking Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-04-25 07:19 -0700
Re: g++ and linking "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2022-04-25 09:06 -0700
Re: g++ and linking Andrey Tarasevich <andreytarasevich@hotmail.com> - 2022-01-22 10:24 -0800
csiph-web