/* Make the optimizer believe the variable can be manipulated arbitrarily. */
#define _NOLIBC_OPTIMIZER_HIDE_VAR(var) __asm__ ("" : "+r" (var))
+#if __nolibc_has_feature(undefined_behavior_sanitizer)
+# define __nolibc_no_sanitize_undefined __attribute__((no_sanitize("function")))
+#else
+# define __nolibc_no_sanitize_undefined
+#endif
+
#endif /* _NOLIBC_COMPILER_H */
#endif /* NOLIBC_IGNORE_ERRNO */
void _start_c(long *sp);
-__attribute__((weak,used))
-#if __nolibc_has_feature(undefined_behavior_sanitizer)
- __attribute__((no_sanitize("function")))
-#endif
+__attribute__((weak,used)) __nolibc_no_sanitize_undefined
void _start_c(long *sp)
{
long argc;