Suppose I want to mark a non-inline function with [[gnu::cold]];
should the attribute be placed in the declaration in the header, or should it go with the definition in a source file? Assume that I will not be using LTO and simply want that specific function to be optimized for binary size and not execution speed.
header example:
[[gnu::cold]] void rarely_called_func();
source file example:
[[gnu::cold]] void rarely_called_func() { ... }
Also, which position in the declaration/definition should it be:
/* A */ int /* B */ func () /* C */;