info gcc 5.25 Declaring Attributes of Functions ... Some people object to the `__attribute__' feature, suggesting that ISO C's `#pragma' should be used instead. At the time `__attribute__' was designed, there were two reasons for not doing this.
1. It is impossible to generate `#pragma' commands from a macro.
2. There is no telling what the same `#pragma' might mean in another compiler.