183 karma · joined October 31, 2015
> for which the Standard imposes no requirements.
C89 had no requirements, C99 clarified that the line that followed was non-normative.
The entire premise of this article is flawed.
Compilers have an attribute to remove this overhead, but it's an ABI break to do it.
But the preprocessor isn't what makes compiling C++ slow. It's a combination of the complex grammar, and ahead of time optimization of a (mostly) static language. Turns out you can compile code really fast if you don't actually try to optimize it.
Also, people have done interesting things in constexpr that currently suffer from slow compile times: https://github.com/hanickadot/compile-time-regular-expressio...
C++ defines constant evaluation to be the same as normal evaluation, although C++20 is adding a way to tell when you're evaluating at compile time so you can avoid things like inline asm at compile time.
constexpr doesn't even mean const_statement. All it means is don't emit an error if constant evaluation calls this function.
At no point have they tried to force something into LLVM that goes against the wishes of the community. They have always worked with the LLVM community to improve LLVM, and LLVM has benefited greatly from Google's contributions. I expect this project to be no different.
The notion that a LLVM libc would in some way make other libc's "second class" is completely unfounded. libc++ vs. libstdc++ is proof of this.
What my team has been looking at to help developers that have these issues is providing low overhead ways to give defined, but likely to crash, behavior for these cases. This helps protects against UB without creating C. An example would be variable auto-init, which intentionally doesn't support zero init, as that is likely to hide bugs: https://reviews.llvm.org/D54604
I'm fine with fully defining some things that are currently UB or IB. I'm also fine with keeping things as UB. What I'm not fine with is creating this implicit C that programmers think they know what it is, but it's not actually defined anywhere, and not everyone working on the compiler is on the same page about.
Currently every compiler except MSVC plans to make module files version locked. Different versions of the same compiler will use different module files.
Personally I find little value in portable module files, as you need to be able to rebuild modules anyway to handle pretty much any change to compile flags.
On a single CPU system it works because when the current process stops running (calls sleep, does IO, etc...) the kernel looks to see if there's anything else to do, if not, it knows the system is now idle.
This becomes a problem when a different implementation adds amazing tools for finding bugs (the sanitizer suite, for instance), and you can't use them because your code doesn't build with any other implementation.
This is incorrect. Compilers are allowed to reorder and combine atomics as long as they follow the rules. See: https://github.com/jfbastien/no-sane-compiler