News for hackers. Stuff that matters.
Re:Which programming language is used for making Windows 10? by missjellyfish on Sunday April 14, 2019 @02:36PM (#19660901)
The real question is: is it compiled with the same msvc compiler that ships in the SDK? If so, they don’t even use C99. C89 all the way. That especially means no variable declaration anywhere in the function body.
Re:Which programming language is used for making Windows 10? by ComputerGuru on Sunday April 14, 2019 @03:06PM (#19661068)
While MSVC doesn't have full C99 support, MSVC supported most of the features that shipped in C99 that make it much less painful to develop in C quite a number of years before C99 support formally landed in other compilers. MS will probably never support full C99 because the demand isn't there, but it's certainly not ANSI C you are expected to write.
Re:Which programming language is used for making Windows 10? by coldcat on Sunday April 14, 2019 @08:23PM (#19662484)
MSVC support C11 because it a prerequisite for C++17. The limits are you need to compile in C++, so the very few changes/incompatibilities between C and C++ always bend to the C++ choices. The preprocessor isn't what people used to have in C99 so some macro still not portable.
Re:Which programming language is used for making Windows 10? by ComputerGuru on Monday April 15, 2019 @05:47PM (#19669230)
To the best of my knowledge (i.e. not updated since C++14), C++ is no longer a strict superset of C as of C99, and there are C99 features that are not available in C++, so I'm not sure that's the case. But plenty of overlap, for sure.

Here's a community wiki answer on SO: https://stackoverflow.com/posts/47526708/revisions

Extracted portion of relevance:

    > The following C99 features are not supported by C++:
    >
    > * restricted pointers
    > * variable length arrays
    > * flexible array members
    > * static and type qualifiers in parameter array declarators
    > * compound literals
    > * designated initializers
Re:Which programming language is used for making Windows 10? by userbinator on Sunday April 14, 2019 @02:41PM (#19660920)
It's probably the DDK compiler, although I'm not sure of the difference these days.

In C89 you can declare variables in the middle of the function, as long as they're at the beginning of a { block }. The beginning of a function is somewhat of a special-case of this.

Re:Which programming language is used for making Windows 10? by Bizarro on Sunday April 14, 2019 @04:45PM (#19661607)
IIRC, the NT kernel used a lot of C++ from the beginning.
Re:Which programming language is used for making Windows 10? by xeeeeeeeeeeenu on Sunday April 14, 2019 @03:29PM (#19661186)
>That especially means no variable declaration anywhere in the function body.

Since Visual C++ 2013 it's no longer true.

Re:Which programming language is used for making Windows 10? by vl on Monday April 15, 2019 @05:34PM (#19669132)
Yes and no. Compiler is checked in with the (Windows) source code and is periodically updated/patched as project goes along. When SDK or DDK is released, it's the same compiler at some specific version.
Re:Which programming language is used for making Windows 10? by jdsully on Sunday April 14, 2019 @03:10PM (#19661085)
Any code in active development would have been ported to C++ (although left in the original C "style"). The MSVC C compiler is just for back-compatibility and not intended for modern C development.
Re:Which programming language is used for making Windows 10? by pjmlp on Sunday April 14, 2019 @03:33PM (#19661212)
The future of systems programming on Windows is C++.

ISO C support has been improved to the extent required by ISO C++ compatibility requirements to ISO C.