cosmopolitan/libc/intrin/weaken.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
468 B
C
Raw Permalink Normal View History

2022-08-11 19:13:18 +00:00
#ifndef COSMOPOLITAN_LIBC_BITS_WEAKEN_H_
#define COSMOPOLITAN_LIBC_BITS_WEAKEN_H_
#ifndef __chibicc__
#define _weaken(symbol) \
__extension__({ \
extern __typeof__(symbol) symbol __attribute__((__weak__)); \
&symbol; \
2023-05-01 21:36:25 +00:00
})
#else
#define _weaken(symbol) (&(symbol))
#endif
2022-08-11 19:13:18 +00:00
#endif /* COSMOPOLITAN_LIBC_BITS_WEAKEN_H_ */