Skip to content

Commit 8e7da2c

Browse files
committed
Add suggestion from @petrhoesk
1 parent c908ee0 commit 8e7da2c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libc/include/__llvm-libc-common.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@
4848
#endif
4949

5050
#undef _Returns_twice
51+
#if __cplusplus >= 201103L
5152
#define _Returns_twice [[gnu::returns_twice]]
53+
#else
54+
#define _Returns_twice __attribute__((returns_twice))
55+
#endif
5256

5357
// This macro serves as a generic cast implementation for use in both C and C++,
5458
// similar to `__BIONIC_CAST` in Android.

0 commit comments

Comments
 (0)