To make it easier to eliminate it for different compiler. If you have portable code, you have to remove them for other compilers, so you do
#ifndef __GNUC__
#define __attribute__(x)
#endif
The problem is that attributes have various number of arguments and you can combine multiple attributes in one __attribute__
declaration, but C only introduced variadic macros in C99. With double parenthesis the above definition does not need variadic macros.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…