I noticed clang (MSVC built: clang version 3.0 (trunk 143028) Target:
x86_64-pc-win32) seems to ignore __declspec(align(n)) when I was
trying to compile the winpthreads library from mingw-w64 project.
This causes APIs like setjmp(), GetThreadContext() to fail (there are
most likely more but these I have encountered and can confirm to work
I first tried some macro "massage" that replaced __declspec(align(n))
with __attribute__((aligned(n)) and things compiled and worked fine.
Such workaround is not elegant I think: it feels a bit dangerous to
#define align(x) aligned(x) #define __declspec(x) __attribute__((x))
globally? How would this affect other supported __declspecs
Since this didn't seem too complicated I wondered if I could make my
first clang "hack" It turned out there's not more to do than: