Date: Tue, 23 May 2023 09:00:50 -0500
On Tue, May 23, 2023 at 2:54 AM Ville Voutilainen
<ville.voutilainen_at_[hidden]> wrote:
>
> On Tue, 23 May 2023 at 10:48, Gabriel Dos Reis via SG15
> <sg15_at_[hidden]> wrote:
> >
> > [René]
> > > Since msvc understands that single initial dash. It also means it
> > > understands any double-dash option.
> >
> > No, it doesn't mean that.
>
> Indeed.
>
> cl : Command line warning D9002 : ignoring unknown option '-------permissive'
>
> cl : Command line warning D9002 : ignoring unknown option '--permissive'
>
> MSVC is not in the business of shouting too loudly about nonsense
> options, but that doesn't mean it understands
> them, let alone understands them to be the same as single-dash options.
That doesn't prove that a *new* option can't be added that is
internally named "-std-info" (single leading dash) which is externally
used as "--std-info" (double leading dash). It only proves that there
are no existing options internally named "------permissive" (6 lead
dashes) or "-permissive" (one lead dash).
The following does show that there is some form of understanding of
"-" or "/" as equivalent option designators:
cl --help --thing.cpp /thing.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.35.32217.1 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl : Command line warning D9002 : ignoring unknown option '--help'
cl : Command line warning D9002 : ignoring unknown option '--thing.cpp'
cl : Command line warning D9002 : ignoring unknown option '/thing.cpp'
cl : Command line error D8003 : missing source filename
I do admit that internally cl.exe could enforce that option names
start with a letter character (assuming the highly likely parsing
method that allows "/" and "-" as equivalent prefixes). Hence
preventing the straightforward change to add specific new double dash
options.
I do look forward to hearing from someone in the msvc team who is
knowledgeable on the option parsing to clarify what's possible. Either
directly from them or perhaps if Gaby can check himself :-) (Or if
there's some publicly available source code on this I can check myself
-- or equivalent like an NDA).
I am also glad we are talking about this here and now. As it will help
further decisions on the rest of the wording for the other parts of
the IS. And obviously reaching some form of consensus on CLI option
syntax is of utmost importance.
<ville.voutilainen_at_[hidden]> wrote:
>
> On Tue, 23 May 2023 at 10:48, Gabriel Dos Reis via SG15
> <sg15_at_[hidden]> wrote:
> >
> > [René]
> > > Since msvc understands that single initial dash. It also means it
> > > understands any double-dash option.
> >
> > No, it doesn't mean that.
>
> Indeed.
>
> cl : Command line warning D9002 : ignoring unknown option '-------permissive'
>
> cl : Command line warning D9002 : ignoring unknown option '--permissive'
>
> MSVC is not in the business of shouting too loudly about nonsense
> options, but that doesn't mean it understands
> them, let alone understands them to be the same as single-dash options.
That doesn't prove that a *new* option can't be added that is
internally named "-std-info" (single leading dash) which is externally
used as "--std-info" (double leading dash). It only proves that there
are no existing options internally named "------permissive" (6 lead
dashes) or "-permissive" (one lead dash).
The following does show that there is some form of understanding of
"-" or "/" as equivalent option designators:
cl --help --thing.cpp /thing.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.35.32217.1 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl : Command line warning D9002 : ignoring unknown option '--help'
cl : Command line warning D9002 : ignoring unknown option '--thing.cpp'
cl : Command line warning D9002 : ignoring unknown option '/thing.cpp'
cl : Command line error D8003 : missing source filename
I do admit that internally cl.exe could enforce that option names
start with a letter character (assuming the highly likely parsing
method that allows "/" and "-" as equivalent prefixes). Hence
preventing the straightforward change to add specific new double dash
options.
I do look forward to hearing from someone in the msvc team who is
knowledgeable on the option parsing to clarify what's possible. Either
directly from them or perhaps if Gaby can check himself :-) (Or if
there's some publicly available source code on this I can check myself
-- or equivalent like an NDA).
I am also glad we are talking about this here and now. As it will help
further decisions on the rest of the wording for the other parts of
the IS. And obviously reaching some form of consensus on CLI option
syntax is of utmost importance.
-- -- René Ferdinand Rivera Morell -- Don't Assume Anything -- No Supone Nada -- Robot Dreams - http://robot-dreams.net
Received on 2023-05-23 14:01:05