Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c++ Subject: Re: An example: code to list exports of a Windows DLL. Date: Wed, 21 Aug 2019 19:24:34 -0700 Organization: None to speak of Lines: 66 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: reader02.eternal-september.org; posting-host="86d9e6508dbb5cfb0b02ef73dc8e113e"; logging-data="14724"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+xRHT04X6y7PZ7OUubMSjG" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:3SNppWL4YtmytIEo8NhGhK3Op6k= sha1:7VFutduXMbcdrBulW3gOVMd5L1o= Xref: csiph.com comp.lang.c++:67860 "Alf P. Steinbach" writes: > On 21.08.2019 21:41, Keith Thompson wrote: [...] >> By accepting identifiers with "$" without a diagnostic in what is >> intended to be a conforming mode, g++ is violating the requirements of >> the C++ standard. If you disagree, what exactly is your argument? > > The above responds to what was a coherent /reductio ad absurdum/ > argument, now lost in refocusing on and possibly misinterpreting one of > the shattered pieces of it. I still can't make any sense of what you've written so far in this thread. Perhaps I'll stop trying. > As pointed out by you up-thread it's not the case that accepting the `$` > requires a diagnostic in all versions of the standard. g++ is simply not > fully up to date regarding C++17 in this respect. But then few > compilers, if any, are standard-conforming by default: one needs to > cajole them into conformance by applying the relevant set of options. As I said, I did apply the relevant set of options. C++17 does not permit '$' in identifiers, and requires a diagnostic for any program that attempts to use a '$' in an identifier. Earlier editions of the standard do permit implementations to support '$' in identifiers. gcc's lack of a diagnostic in conforming mode "gcc -std=c++17 -Wpedantic" makes it non-conforming. If you agree with that, I don't know what we're arguing about. If you don't, I have yet to see an explanation. I've also suggested that the committee probably did not intend to make a significant change in this area. [...] > It's possible that all this is tied to the attempt to remove `$` in > ASCII, as I recall instigated by Russia or France, a political thing. I > mean, tied by the baffling decision to not include `$` in the C++ basic > execution character set. I've never heard of any attempt to remove '$' from ASCII, which I believe has not changed since 1967. Do you have a citation for that? '$' is not in the source or execution basic character set, a decision that was made a long time ago. Apparently '$' is not supported in all versions of EBCDIC, or at least doesn't have a consistent code (see the Wikipedia article). And there are no tokens in C or C++ that required $ (or @ or `, the only three printable ASCII characters not in the C or C++ basic character set). > For the new ASCII that I don't remember the name of, we got the (hark) > universal currency symbol `¤` as a replacement for `$`. Nobody uses > that. It's meaningless except as a political statement, but it's there > on my keyboard, taking up one key combination. There is no "new ASCII". ASCII is a 7-bit character set. '¤' is part of Unicode (and Latin-1). Unicode calls it "CURRENCY SIGN". It's not a replacement for '$' (DOLLAR SIGN), which still exists in ASCII, Latin-1, and Unicode. (DOLLAR SIGN is 0x24. CURRENCY SIGN is 0xA4.) If there's a political issue, it's not one that interests me unless it's relevant to C++. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Will write code for food. void Void(void) { Void(); } /* The recursive call of the void */