[PATCH] support: Define support_static_assert for use from C and C++
Paul Eggert
eggert@cs.ucla.edu
Sun Dec 31 23:40:00 GMT 2017
Florian Weimer wrote:
> _Static_assert is reserved in C++ as well, so I don't want to touch it. The GCC
> headers might eventually use it in a way which is not strictly equivalent to
> static_assert.
If we don't care about the difference (what is it, by the way?), then something
like this should work:
#ifndef __cplusplus
# define static_assert _Static_assert
#endif
since "static_assert" is not reserved in C.
I wish these committees would coordinate better....
More information about the Libc-alpha
mailing list