Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4c91662

Browse files
authoredNov 25, 2024··
[libc] Resolve multi-line comment error (#117636)
gcc interprets a backslash '\\' as the last char before a new line as a line continuation character, even in a comment context. This can produce an "error: multi-line comment [-Werror=comment]". This removes the line continuation so that the comment can compile with gcc.
1 parent ab4e066 commit 4c91662

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎libc/src/__support/common.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,15 @@
2121
#define LLVM_LIBC_FUNCTION_ATTR
2222
#endif
2323

24+
// clang-format off
2425
// Allow each function `func` to have extra attributes specified by defining:
2526
// `LLVM_LIBC_FUNCTION_ATTR_func` macro, which should always start with
2627
// "LLVM_LIBC_EMPTY, "
2728
//
2829
// For examples:
2930
// #define LLVM_LIBC_FUNCTION_ATTR_memcpy LLVM_LIBC_EMPTY, [[gnu::weak]]
30-
// #define LLVM_LIBC_FUNCTION_ATTR_memchr LLVM_LIBC_EMPTY, [[gnu::weak]] \
31-
// [[gnu::visibility("default")]]
31+
// #define LLVM_LIBC_FUNCTION_ATTR_memchr LLVM_LIBC_EMPTY, [[gnu::weak]] [[gnu::visibility("default")]]
32+
// clang-format on
3233
#define LLVM_LIBC_EMPTY
3334

3435
#define GET_SECOND(first, second, ...) second

0 commit comments

Comments
 (0)
Please sign in to comment.