cosmopolitan/libc/intrin/weaken.h

17 lines
553 B
C
Raw Normal View History

2022-08-11 19:13:18 +00:00
#ifndef COSMOPOLITAN_LIBC_BITS_WEAKEN_H_
#define COSMOPOLITAN_LIBC_BITS_WEAKEN_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
#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 /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_LIBC_BITS_WEAKEN_H_ */