Quote:
If you want to recommend checking C code by compiling it as C++, by all means go ahead. But then when the C++ compiler raises a diagnostic, one has to determine if the diagnostic genuinely signals a problem, or is due to a difference between C and C++.
In other words, you have to pick a language. If you say: this is C++ code, then yes, you can get away with using C++ specific constructs even though the code is mostly in a C style. If you say: this is C code, then no, you do not get the "bool" data type for free, even though you compile the code in a C++ compiler.
This is the case why I call the code "C++/C". It is C++ code, but it is not full C++ code that takes advantage of C++, it's still mostly C. But it can still take advantages of some C++ features, so yes, it's C++, but it's still essentially C, so the term "C++/C" applies nicely I think.
Quote:
Programming languages are tools too. So if C++ is available, and you consider C++ to be better than C, then use C++, not C, even if you mainly use the C subset of C++. But if you insist on using C, then use C, even if you only use the common subset of C and C++.
So if we consider tools, reliability, security, etc, then we can categorize code as: