I am interested in the context of C++ code, using compilers such as Clang or GCC. We saw attributes such as __attribute__((always_inline))
and also pragmas such as #pragma inline
.
Since both of them provide additional information to the compiler, why would we need one over the other? Regardless of the specific feature keyword, what are the differences in the definitions of the two?
Still confused after reading some available informations:
https://stackoverflow.com/questions/37016119/can-c-attributes-be-used-to-replace-openmp-pragmas