Hi Paul,
Thanks for this work!
Testing it on various platforms, I see the following problems:
1) On MSVC 9, I get syntax errors in test-stdalign.c:90, the
reason being an extraneous level of parentheses in
# define _Alignas(a) __declspec ((align (a)))
Once this is fixed, I get syntax errors about the << operator.
In fact, while MSVC accepts
int __declspec (align (8)) foo;
it rejects
int __declspec (align (1 << 3)) foo;
In other words, it wants only literals, not constant expressions.
I'm not sure what is better: offering a macro that works only
for literals, or defining a macro that gives no syntax error but
does nothing.
2) The test calls abort() on several platforms:
FreeBSD/x86 6.4
Solaris 10 with cc (both SPARC and x86)
mingw
3) The test causes a segmentation fault on:
Cygwin 1.5.25.
Maybe it would be better to use the ASSERT macro, or simple
fprintf(stderr,...) calls, to get more information about the aborts?
Bruno
--
In memoriam Helmuth Hübener <http://en.wikipedia.org/wiki/Helmuth_Hübener>