Will the code below be able to be compiled on GNU compilers if the user defines DLL_IMPORT or DLL_EXPORT? Or gcc/g++ will complain about the __declspec?

Code:
#ifndef TEST_H
#define TEST_H

//Use this header for end user.
#ifdef DLL_IMPORT
#    define DLL_MACRO __declspec(dllimport)

//Use this header for building the dll.
#elif defined DLL_EXPORT
#    define DLL_MACRO __declspec(dllexport)
#else
#	define DLL_MACRO
#endif


DLL_MACRO void print(const char *message);

#endif