Originally, __attribute__ is a built-in keyword for the compiler. It is not a macro, as others suggested earlier. If you #define it to be empty, then the compiler will never see the keyword, as the preprocessor deletes it. So using #undef exactly undoes the action of the HDF5 header file, making the original keyword again visible to the compiler.