svn commit: r228902 - head/include
Ed Schouten
ed at FreeBSD.org
Mon Dec 26 18:58:00 UTC 2011
Author: ed
Date: Mon Dec 26 18:57:59 2011
New Revision: 228902
URL: http://svn.freebsd.org/changeset/base/228902
Log:
As per C11, add static_assert() to <assert.h>.
Modified:
head/include/assert.h
Modified: head/include/assert.h
==============================================================================
--- head/include/assert.h Mon Dec 26 18:55:37 2011 (r228901)
+++ head/include/assert.h Mon Dec 26 18:57:59 2011 (r228902)
@@ -57,7 +57,13 @@
#ifndef _ASSERT_H_
#define _ASSERT_H_
+
+#if __ISO_C_VISIBLE >= 2011 && (!defined(__cplusplus) || __cplusplus < 201103L)
+#define static_assert _Static_assert
+#endif
+
__BEGIN_DECLS
void __assert(const char *, const char *, int, const char *) __dead2;
__END_DECLS
+
#endif /* !_ASSERT_H_ */
More information about the svn-src-head
mailing list