On 11.01.2014 21:06, Aaron Ballman wrote: > #if __has_attribute(dllexport) > #define DLLEXPORT __attribute__((dllexport)) > #else > #define DLLEXPORT > #endif > > void func(void) DLLEXPORT; > > If you were to use this code today in clang, it would fail to compile. > __has_attribute(dllexport) will be replaced with 1, and so the > resulting code would become: void func(void) > __attribute__((dllexport)); However, we do not support dllexport with > that syntax (we only support __declspec(dllexport)). So the code would > look reasonable, but fail to compile.
How will a more advanced __has_attribute help here since GCC and MSVC all reject this trailing attribute (and Clang rightfully warns about this)? -Nico _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
