Originally posted by FeRD_NYC
View Post
Originally posted by stibium
View Post
But the Linux userland violates the language specification, especially for C++. It is so dependent on the exact standard library implementation of GCC and other GCC features that it can lead to many problems mixing compilers up.
I've already argued with Linux fanboys in another thread where they defend this behavior of violating ODR (which works in C because everything uses glibc, but technically it's illegal even there though, it's just not a practical issue, but it still breaks "standards") when I complained about it (both Windows and Mac OS don't, so it's not like everything does, only Linux userland does). Because they're too lazy to make symmetrically designed APIs (i.e. an API that allocates an object must also provide a means of freeing/destroying the object) and other stuff like this. They also pass std library types like hot cakes in library APIs when they are different between GCC and Clang's std libraries so ODR is violated and crashes likely occur.
Note that it's not really the kernel's fault whatsoever, so it's not Linux per se, just the userland libraries. Linux (the kernel) is still solid as ever.
Leave a comment: