11

We apparently have a tag for MSVC's compiler command-line, , separate from the compiler itself and the dialect of C/C++ it supports ( which is a synonym for ; AFAIK we don't have a tag for MSVC C as opposed to C++.).

We also have a (100 questions), which AFAICT is exactly the same thing as (234 questions). The tag wiki for [cl] even mentions that the command is cl.exe.

cl.exe should probably be a synonym of cl, but I don't have reputation points in either of those tags. https://stackoverflow.com/tags/cl/synonyms is where someone can suggest cl.exe as a synonym and vote on it.

It's redundant to have both of these tags, but I don't think we need to burninate cl.exe. Both names are clear. (OTOH, cl.exe does make the command-line nature clearer, and avoids confusion with other contexts with cl might possibly mean something, if there are any in the future.)

So perhaps we should synonym the other direction, cl -> cl.exe? There's no reason the tag with the most questions needs to selected, especially in this case where one is a prefix of the other; it won't cause any problems for searching or typing it.


The first time I ever encountered either of these tags (here), retagging to was more appropriate because the question had nothing to do with the cl command line tool, just the compiler / language extensions. Anyone investigating these tags should keep an eye out for that.

9
  • 11
    Oh good, the cl tag wiki is just the first 2 lines of the MS docs :facepalm: Commented Jan 30, 2021 at 18:50
  • 3
    Even better, all that cl references in its wiki tag is "cl.exe". From that description, it feels like cl should be a synonym of cl.exe not the other way round.
    – Thom A
    Commented Jan 30, 2021 at 19:19
  • 1
    @Larnu: Uh, it does say it's Microsoft's C and C++ compiler / linker command line. It's not like the cl.exe tag description is much. But the choice of which tag to keep should probably be governed by which name is clearer / better, not which tag currently has more questions. cl.exe as a tag name maybe makes the command-line nature clearer, and will discourage people from using it for the language? Also possibly disambiguates against other completely-different usages of that 2-letter abbreviation. Commented Jan 30, 2021 at 19:35
  • That is what I am saying, @PeterCordes , that cl should be made a synonym of cl.exe; so the tag cl.exe is retained.
    – Thom A
    Commented Jan 30, 2021 at 19:36
  • 1
    @Larnu: Yes, I know that's what you were saying, but your reasoning (based on the current content of the tag wikis) seemed very sketchy. I ended up agreeing with you based on the actual tag names themselves; wikis can be edited so the one we pick as the primary can get a good wiki. Commented Jan 30, 2021 at 19:38
  • 1
    Does it even make sense at all to have a tag named after the filename of the executable? I mean, the tag for Visual Studio Code is visual-studio-code, not code.exe or visual-studio-code.app. The tag for GCC is gcc, not gcc.exe. The tag for Clang is clang, not clang.exe. The tag for LLVM is llvm, not llvm.dylib. Commented Jan 31, 2021 at 10:43
  • gcc, clang and Visual Studio Code are names for complete systems. But cl is just a small part of a system. So a set of comparable tags could be gcc, clang, visual-studio-code and visual-studio (which we already have).
    – anatolyg
    Commented Jan 31, 2021 at 14:07
  • 2
    @anatolyg: No, Visual Studio Code and Visual Studio are in no way comparable to gcc, clang, and msvc. The former are integrated development environments complete with editors and debuggers, the latter are compilation toolchains.
    – Ben Voigt
    Commented Feb 1, 2021 at 1:49
  • 1
    Maybe we should just ask @CL.? (who is 150k+ rep)
    – Basj
    Commented Feb 1, 2021 at 14:03

2 Answers 2

14

The more this gets discussed, the less sure I am that it makes any sense to have a separate tag for cl, the command-line tool, separate from the compiler itself (, currently a synonym for which has the downside of not leaving any tag for MS's compiler in C mode.)

For example, the gcc and g++ command-line front-ends for the GNU Compiler Collection (GCC) can invoke ld (with options that link libc and CRT startup, etc.), so in some sense you can call gcc a linker, too. (Side-note: we have and tags which are as much about the GNU dialect of those languages than the actual command line tools, although I'd still tag on a question about how GCC compiles C++, especially if the question is about the back-end optimizer, but even in general.)

That "linker" part of the tag wiki description is what made me think keeping it separate from the MSVC tag was a good idea. But it does basically work fine to have questions about using gcc to link a .o produced by , for example.

TL:DR: this answer proposes making both and synonyms of (https://stackoverflow.com/tags/visual-c%2b%2b/synonyms). Vote on this answer accordingly.

I have not gone through any of the [cl] or [cl.exe] questions to see what they're like; whether many of them are actually about the command-line tool and its options, or whether many are actually about the compiler / language (source it accepts, asm it creates). Or part way in between, e.g. about the warning messages it outputs.

Burnination of [cl] and/or [cl.exe] is an option, but probably not necessary; synonyms should cover it.

6
  • @StevenPenny: So my suggestion is automatically wrong because I know about MSVC primarily via SO questions and Godbolt instead of using it on a desktop? I don't want to claim I'm an expert on it, but my caveats may have made it sound like I know less about it and Windows than I actually do. I've seen (and edited tags on) boatloads of questions about it, and have gold badges in [c], [c++], [assembly], [x86], and [x86-64]. If you used your comment as reasoning for a downvote regardless of the actual merit of the suggestion, that's just being a jerk for no reason and/or missing the point. Commented Jan 31, 2021 at 4:13
  • @StevenPenny: I phrased it with an "if" for exactly that reason: I don't know who downvoted my answer and don't expect anyone to confirm or deny my guess. Your first comment seemed pretty rude to me, I considered flagging it as "unfriendly". Telling someone they must not know enough to even make a suggestion (without pointing out any specific problem with the suggestion) is also not very constructive. Commented Jan 31, 2021 at 4:25
  • @StevenPenny: Being a Windows user is not necessary to understand the concept of a command line tool. Especially not when I already do understand quite a few things about it, and have experience in the other SO tags for the compiler in question. I have used Windows on other people's computers, for whatever that's worth, just not for C/C++ development (except for one job a decade ago where I did use visual studio.) Using it via godbolt.org does even mean knowing some of its command-line options, exactly what this tag is about. Commented Jan 31, 2021 at 4:38
  • 1
    @StevenPenny: And if you read this answer carefully, it makes a suggestion and requests that people vote on it. Those people would be those who use MSVC more regularly than I do (presumably on Windows). I'm not qualified to decide, but I feel perfectly justified in making suggestions. Maybe you missed the point of meta as a place to up/down vote things according to whether you think it's a good idea or not. I literally can't do anything to the tags in question on my own. Commented Jan 31, 2021 at 4:40
  • 2
    FYI: "gcc" means "GNU Compiler Collection" which explicitly includes a C++ compiler. It does not mean "the tool launched by a file named gcc"... and even that tool is happy to compile C++ if you pass the appropriate options.
    – Ben Voigt
    Commented Feb 1, 2021 at 1:53
  • 1
    Another point: There's not actually any supported way to invoke the Microsoft Visual C++ Compiler (which is both a C and C++ compiler, it would be foolhardy to try to write Visual C Compiler as no such product exists) other than cl.exe. The various first-party and third-party integrated development environments launch cl.exe, directly or indirectly, and parse its output. Project properties in an IDE consist of configuring the cl.exe and link.exe command-line arguments.
    – Ben Voigt
    Commented Feb 1, 2021 at 1:55
-1

These Microsoft documents could be helpful:

Based on the titles, I would say cl is the correct choice. However to me thats quite short, I would prefer something like cl-command. I also see it referred to as the MSVC compiler, so maybe
cl-compiler or msvc-compiler.

4
  • Yes, Windows command shells allow the .exe to be omitted or not on executable file names, and it's normal that MS would document it without the .exe. So in that sense cl.exe is a clunky tag name, and a poor way to disambiguate against other uses. I think for now (very low traffic tag), we should just pick one or the other of the existing tags to make a synonym, unless anyone feels really strongly, or has a really good name. (I don't feel like cl-command is wonderful; it just feels longer without being tremendously more specific, and doesn't hint at being MS or Windows.) Commented Jan 31, 2021 at 3:27
  • Apparently it's not just a compiler, also a linker, perhaps like how the gcc front-end can also invoke ld? I haven't used MSVC except on Godbolt. Commented Jan 31, 2021 at 3:28
  • 1
    msvc already exists and is a synonym for visual-c++ (the language / compiler). If cl or anything like it should exist at all (maybe not), it should be clearly about the command-line tool and its options, not the compiler that it drives. Maybe we should just burninate the thing as this topic could easily be part of [msvc], or make both cl and cl.exe a synonym of [msvc] / [visual-c++]. Commented Jan 31, 2021 at 3:45
  • Hell no, I'm not the person that should be making the decision, just commenting on how the options appear to me! Possibly I'm wrong and cl-compiler is a great name for a tag that has some reason to exist separately from msvc, but I highly doubt it. I wrote up the idea of just making them both synonyms of visual-c++ so people can vote on it. (To be fair, I do use MSVC on Godbolt, and know some of its command-line options like -O2 -Gv. I just haven't used it for anything except compiling, e.g. for linking. I think I have enough experience in asm and compiler tags to at least comment.) Commented Jan 31, 2021 at 3:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .