Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> the Windows kernel and win32 libraries written in C and the application in C++

To my knowledge the kernel and win32 is in fact written in C++ and only the interface has C linkage and follows C norms.

So this error occurred going C++ > C > C++ never mind languages with different memory protection mechanisms like Rust > C > C++.



It’s an unholy combination of C, C++, and Microsoft extensions at worst. But apart possibly from some COM-related DLLs, the spirit is clearly C, and C++ exceptions are generally not expected. (There may be use of SEH in some parts.)

Of course, you can write C++ without exception safety too, but “C++ as a better C” and exception-safe C++ are effectively like two different languages.


I filed bugs against both GCC and LLVM asking for compiler warnings that would inform developers of the risk:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118263

https://github.com/llvm/llvm-project/issues/121427


No, the windows kernel is written in pure C.


I believe it's C++, but not allowed to use exceptions.


We know that it's pure C, because it leaked.


All of it is C?




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: