mirror of
https://git.FreeBSD.org/src.git
synced 2026-06-02 11:24:32 +00:00
assert.h: Revert "Remove leading tabs for whitespace consistency"
This reverts commit157c184689. As per style(9), a tab goes after #define. This should not have been removed. Reported by: kib Fixes:157c184689. Pull Request: https://github.com/freebsd/freebsd-src/pull/2203
This commit is contained in:
+13
-13
@@ -46,11 +46,11 @@
|
|||||||
#undef __assert_unreachable
|
#undef __assert_unreachable
|
||||||
|
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
#define assert(...) ((void)0)
|
#define assert(e) ((void)0)
|
||||||
#define _assert(...) ((void)0)
|
#define _assert(e) ((void)0)
|
||||||
#if __BSD_VISIBLE
|
#if __BSD_VISIBLE
|
||||||
#define __assert_unreachable() __unreachable()
|
#define __assert_unreachable() __unreachable()
|
||||||
#endif /* __BSD_VISIBLE */
|
#endif /* __BSD_VISIBLE */
|
||||||
#else
|
#else
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#if __cplusplus < 202002L
|
#if __cplusplus < 202002L
|
||||||
@@ -71,25 +71,25 @@
|
|||||||
* of the remaining guarantees.
|
* of the remaining guarantees.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#define __assert_sanitize(...) ((void)0)
|
#define __assert_sanitize(...) ((void)0)
|
||||||
#else
|
#else
|
||||||
#define __assert_sanitize(...) (void)sizeof(((bool(*)(bool))0)(__VA_ARGS__))
|
#define __assert_sanitize(...) (void)sizeof(((bool(*)(bool))0)(__VA_ARGS__))
|
||||||
#endif /* __cplusplus < 202002L */
|
#endif /* __cplusplus < 202002L */
|
||||||
#else
|
#else
|
||||||
#define __assert_sanitize(...) (void)sizeof(((_Bool(*)(_Bool))0)(__VA_ARGS__))
|
#define __assert_sanitize(...) (void)sizeof(((_Bool(*)(_Bool))0)(__VA_ARGS__))
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
#define assert(...) (__assert_sanitize(__VA_ARGS__), \
|
#define assert(...) (__assert_sanitize(__VA_ARGS__), \
|
||||||
(__VA_ARGS__) ? (void)0 : \
|
(__VA_ARGS__) ? (void)0 : \
|
||||||
__assert(__func__, __FILE__, \
|
__assert(__func__, __FILE__, \
|
||||||
__LINE__, #__VA_ARGS__))
|
__LINE__, #__VA_ARGS__))
|
||||||
#define _assert(...) assert(__VA_ARGS__)
|
#define _assert(...) assert(__VA_ARGS__)
|
||||||
#if __BSD_VISIBLE
|
#if __BSD_VISIBLE
|
||||||
#define __assert_unreachable() assert(0 && "unreachable segment reached")
|
#define __assert_unreachable() assert(0 && "unreachable segment reached")
|
||||||
#endif /* __BSD_VISIBLE */
|
#endif /* __BSD_VISIBLE */
|
||||||
#endif /* NDEBUG */
|
#endif /* NDEBUG */
|
||||||
|
|
||||||
#ifndef __STDC_VERSION_ASSERT_H__
|
#ifndef __STDC_VERSION_ASSERT_H__
|
||||||
#define __STDC_VERSION_ASSERT_H__ 202311L
|
#define __STDC_VERSION_ASSERT_H__ 202311L
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Static assertions. In principle we could define static_assert for
|
* Static assertions. In principle we could define static_assert for
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
*/
|
*/
|
||||||
#if __ISO_C_VISIBLE >= 2011 && !defined(__cplusplus) && \
|
#if __ISO_C_VISIBLE >= 2011 && !defined(__cplusplus) && \
|
||||||
__STDC_VERSION__ < 202311L
|
__STDC_VERSION__ < 202311L
|
||||||
#define static_assert _Static_assert
|
#define static_assert _Static_assert
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
|
|||||||
Reference in New Issue
Block a user