Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #67859

Re: An example: code to list exports of a Windows DLL.

From "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>
Newsgroups comp.lang.c++
Subject Re: An example: code to list exports of a Windows DLL.
Date 2019-08-22 03:38 +0200
Organization A noiseless patient Spider
Message-ID <qjkrm7$155$1@dont-email.me> (permalink)
References (8 earlier) <qjivda$fb2$1@dont-email.me> <qjj213$814$1@dont-email.me> <ln1rxe3kr6.fsf@kst-u.example.com> <qjj6fo$gg6$1@dont-email.me> <lnsgpu1f2x.fsf@kst-u.example.com>

Show all headers | View raw


On 21.08.2019 21:41, Keith Thompson wrote:
> "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> writes:
>> On 21.08.2019 11:55, Keith Thompson wrote:
>>> "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> writes:
>>>> On 21.08.2019 10:29, David Brown wrote:
>>>>> On 20/08/2019 23:59, Keith Thompson wrote:
>>> [...]
>>>>>> The effect is the same: a diagnostic is required.  (If the
>>>>>> implementation chooses to produce an executable after printing the
>>>>>> required diagnostic, I suppose the behavior is undefined by omission.)
>>>>
>>>> There's no need to print anything. /Not/ blinking the caps lock
>>>> indicator for a millisecond is a valid diagnostic. The standard doesn't
>>>> specify what a "diagnostic" or a "diagnostic message" is, that it should
>>>> involve text at all, or that it should be context-independent...
>>>>
>>>> That may sound like a silly argument.
>>>
>>> Yes, it does.
>>>
>>> The standard requires a diagnostic message for certain errors, and
>>> defines a "diagnostic message" as "a message belonging to an
>>> implementation-defined subset of the implementation's output messages".
>>> The phrase "implementation-defined" means the documentation has to
>>> document it.
>>>
>>> gcc's documentation, for example, says:
>>>
>>>      * 'How a diagnostic is identified (C90 3.7, C99 and C11 3.10, C90,
>>>        C99 and C11 5.1.1.3).'
>>>
>>>        Diagnostics consist of all the output sent to stderr by GCC.
>>>
>>> That's for C, but the "C++ Implementation-Defined Behavior" says "Some
>>> choices are documented in the corresponding document for the C
>>> language."
>>>
>>> So no, for gcc/g++ not blinking the caps lock is not a diagnostic.
>>
>> I'm sorry, that's a simple fallacy.
> 
> No, that's what the documentation says.
> 
>> That g++ doesn't do that now, has no bearing on what it /can/ do.
> 
> How is that relevant?
> 
> The language standard requires each implementation to document what a
> "diagnostic" is.  The gcc/g++ documentation clearly documents what a
> "diagnostic" is, in a way that clearly excludes "non-blinking caps
> lock".
> 
> A future version could change that, but I'd be willing to bet that it
> won't.
> 
> 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.

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 far as the formal is concerned g++ can use the non-blinking caps lock
>> as a diagnostic.
> 
> The "formal" what?
> 
> Yes, the standard permits an implementation to use a non-blinking caps
> lock as a diagnostic -- if and only if its documentation defines
> "diagnostic" in a way that's consistent with that.  No implementation
> does so or is likely to do so in the future.
> 
> I thought your argument was based on "common sense".

Yep.


> Here's an idea.  I'll just assume that, at some point in the future, you
> might change your argument and agree with me.  Problem solved.
> 
> [...]
> 
>> For example, I remember `$` being used in the system API in the HP3000.
>> That's long ago, 1980s, but presumably use of `$` in system API function
>> names was part of the reasons why compilers supported it. And continue
>> to support it.
> 
> OpenVMS uses $ in identifiers (and C and C++ compilers for OpenVMS have
> to allow for that).  Which is why, in my opinion, the standard *should*
> allow compilers to accept $ in identifiers.
> 
> [...]

Yes, I should have written MPE/IV, the OS we used on the HP3000. Sorry.

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.

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.


Cheers!,

- Alf

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

An example: code to list exports of a Windows DLL. "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2019-08-02 03:36 +0200
  Re: An example: code to list exports of a Windows DLL. "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2019-08-02 11:22 +0200
  Re: An example: code to list exports of a Windows DLL. rick.c.hodgin@gmail.com - 2019-08-02 02:33 -0700
    Re: An example: code to list exports of a Windows DLL. "Chris M. Thomasson" <invalid_chris_thomasson_invalid@invalid.com> - 2019-08-02 16:54 -0700
      Re: An example: code to list exports of a Windows DLL. "Chris M. Thomasson" <invalid_chris_thomasson_invalid@invalid.com> - 2019-08-02 19:09 -0700
  Now on Github; based ordinals in listing (Re: An example: code to list exports of a Windows DLL.) "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2019-08-02 20:20 +0200
  Re: An example: code to list exports of a Windows DLL. legalize+jeeves@mail.xmission.com (Richard) - 2019-08-19 19:44 +0000
    Re: An example: code to list exports of a Windows DLL. "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2019-08-20 02:12 +0200
      Re: An example: code to list exports of a Windows DLL. Keith Thompson <kst-u@mib.org> - 2019-08-19 18:31 -0700
        Re: An example: code to list exports of a Windows DLL. David Brown <david.brown@hesbynett.no> - 2019-08-20 08:42 +0200
          Re: An example: code to list exports of a Windows DLL. Keith Thompson <kst-u@mib.org> - 2019-08-20 02:18 -0700
            Re: An example: code to list exports of a Windows DLL. Ian Collins <ian-news@hotmail.com> - 2019-08-20 22:22 +1200
              Re: An example: code to list exports of a Windows DLL. Keith Thompson <kst-u@mib.org> - 2019-08-20 14:21 -0700
            Re: An example: code to list exports of a Windows DLL. David Brown <david.brown@hesbynett.no> - 2019-08-20 13:00 +0200
              Re: An example: code to list exports of a Windows DLL. Keith Thompson <kst-u@mib.org> - 2019-08-20 14:59 -0700
                Re: An example: code to list exports of a Windows DLL. David Brown <david.brown@hesbynett.no> - 2019-08-21 10:29 +0200
                Re: An example: code to list exports of a Windows DLL. "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2019-08-21 11:14 +0200
                Re: An example: code to list exports of a Windows DLL. Keith Thompson <kst-u@mib.org> - 2019-08-21 02:55 -0700
                Re: An example: code to list exports of a Windows DLL. "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2019-08-21 12:30 +0200
                Re: An example: code to list exports of a Windows DLL. David Brown <david.brown@hesbynett.no> - 2019-08-21 14:22 +0200
                Re: An example: code to list exports of a Windows DLL. Keith Thompson <kst-u@mib.org> - 2019-08-21 12:41 -0700
                Re: An example: code to list exports of a Windows DLL. "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2019-08-22 03:38 +0200
                Re: An example: code to list exports of a Windows DLL. Keith Thompson <kst-u@mib.org> - 2019-08-21 19:24 -0700
                Re: An example: code to list exports of a Windows DLL. James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-08-21 23:21 -0400
                Re: An example: code to list exports of a Windows DLL. "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2019-08-22 06:01 +0200
                Re: An example: code to list exports of a Windows DLL. James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-08-22 00:26 -0400
                Re: An example: code to list exports of a Windows DLL. "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2019-08-22 07:54 +0200
                Re: An example: code to list exports of a Windows DLL. James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-08-22 09:08 -0400
                Re: An example: code to list exports of a Windows DLL. "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2019-08-22 19:37 +0200
                Re: An example: code to list exports of a Windows DLL. scott@slp53.sl.home (Scott Lurndal) - 2019-08-22 13:17 +0000
                Re: An example: code to list exports of a Windows DLL. David Brown <david.brown@hesbynett.no> - 2019-08-22 16:07 +0200
                Re: An example: code to list exports of a Windows DLL. Keith Thompson <kst-u@mib.org> - 2019-08-21 02:42 -0700
  Re: An example: code to list exports of a Windows DLL. Frederick Gotham <cauldwell.thomas@gmail.com> - 2019-08-20 04:09 -0700
    Re: An example: code to list exports of a Windows DLL. "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2019-08-20 17:24 -0700

csiph-web