4 ms·
Well, there hasn't been a C standard after c89 so it's hard to move forward. In theory there is a c99 standard but it was never adopted by MSVC so good luck wit
by user5994461 6y ago
Well, there hasn't been a C standard after c89 so it's hard to move forward. In theory there is a c99 standard but it was never adopted by MSVC so good luck with that (that is a long story on its own).
On the C++ side, C++ didn't get more spec until C++11 (2011), then it took a decade to be supported by compilers. Imagine how long it takes to roll out a language/library change when compilers themselves are on a 3+ years release schedule.
Either way, the C++ world is heavy on proprietary extensions and tools. There is little care about standards. The standard itself is hard to consider a standard, all it does is suggest tens of new features -some of which are impossible to implement- that may be added one by one over the decade.
- whizzter 6y agoHmm, is there any other major blocker in modern MSVC (that supports C11) other than variable size local arrays to be considered C99 compatible? (Designated initializer fields came into C++20 so they were forced to put that in). Blocking var-sized arrays might've been a blessing in disguise from a security standpoint.
- user5994461 6y agoVariables can only be declared at the beginning of a block in C89. In my opinion that's the main difference between strict C89 and C99. MSVC is very strict about that and there's no workaround to allow it.
- whizzter 6y agoThat's not really a compiler limitation though (since in C++ mode it will happily handle it) but rather a validation/mode thing. Since they now support C11, I'm sure that part is removed if you select C11 mode?
- CJefferson 6y agoMost C code on Unix is at least c99, quite a bit is c11. It also definitely didn't take until 2021 for C++11 support, I work on lots of codebase with c++14 and c++17. I don't know what experiences you have had but I work on lots of large c and c++ codebase which work on many OSes and compilers.