5 ms·
Doesn't work in MSVC though.
by xuhu 12y ago
Doesn't work in MSVC though.
- pling 12y agoThat's not a proper C compiler though, as Microsoft like to point out regularly as a lame excuse...
- fdej 12y agoYet enough people think it's a C compiler that if you try to use avant garde C99 features in your C project, someone will invariably complain that MSVC doesn't build it.
- ibisum 12y ago.. thus giving up C and moving on to C# instead. (Students, I'm looking at you..)
- pjmlp 12y agoMSVC is actually called MSVC++. Microsoft is committed to C++, as a means to improve systems programming safety with more modern languages. Besides, the code makes use of GCC extensions.
- yxhuvud 12y agoThe article specifically states that it requires C99, so of course it doesn't.
- eq- 12y agoC99 compiler won't do, it also requires a GCC extension (statement expressions).
- cremno 12y agoYes, designated initializers were added in ISO C99 and since Visual Studio 2013 they are also supported by MSVC. But the code is neither ISO C99 nor C11. It uses a GNU C extension called “statement expressions”, which is not supported by MSVC. Also, its preprocessor has quite a few problems. I think after removing statement exprs and running the code through a different PP, MSVC will compile it. Of course, one could just simply use MinGW or Clang instead.