Since when is the existing always_inline a mere hint? And since when
is it a request that emits a mere warning if the compiler fails to do
what it's told
to do by that attribute? I mean other than for indirect calls.
GCC issues an error when it fails to inline with [[gnu::always_inline]] applied.
Could we perhaps not reinvent the existing attributes with the same
spelling but with a different meaning?
Making the attributes ignorable hints would be consistent with Clang, so it's standardizing existing practice.
It's also similar to how
constinit works (
https://eel.is/c++draft/dcl.constinit#2).
constinit is stated to make the program ill-formed when dynamic initialization happens, without imposing any change in semantics to initialization (e.g. making things constant-evaluated that otherwise wouldn't be). It's just a means of diagnosing accidental dynamic initialization, just like, say, a standard
[[nrvo]] would diagnose an accidental failure to perform NRVO.
Of course, one of these results in an error and the other in a warning, but there's really no reason why we couldn't have had a [[constinit]] attribute in that style, and you could achieve the same effect using -Werror=... after all.