Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (30 sloc) 936 Bytes
#ifndef _BREAK
#define _BREAK
#ifdef __GNUC__
#define _LABEL(N) _L ## N
#define _EMPTY()
#define _DEFER(x) x _EMPTY()
#define _EXPAND(...) __VA_ARGS__
static void *_1 = 0, *_2 = 0, *_3 = 0, *_4 = 0,
*_5 = 0, *_6 = 0, *_7 = 0, *_8 = 0;
#pragma GCC push_options
#pragma GCC diagnostic ignored "-pedantic"
#define for \
for(void *_ = 0, *_9 = _8, *_8 = _7, *_7 = _6, *_6 = _5, \
*_5 = _4, *_4 = _3, *_3 = _2, *_2 = _1, \
*_1 = &&_EXPAND(_DEFER(_LABEL)(__LINE__)), *_0 = _1; !_; _=_1) \
if(0) { _EXPAND(_DEFER(_LABEL)(__LINE__)):; \
(void)_0; (void)_1; (void)_2; (void)_3; (void)_4; \
(void)_5; (void)_6; (void)_7; (void)_8; (void)_9; } \
else \
for
#pragma GCC pop_options
/**
* \brief Causes the enclosing loop statement to terminate.
*
* `break` accepts an optional numeric argument which tells it how many nested
* enclosing structures are to be broken out of.
*/
#define break(N) goto *_ ## N
#endif
#endif
You can’t perform that action at this time.