Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util/consideredharmful: Use overloadable func attribute with clang #393

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kraj
Copy link

@kraj kraj commented Nov 22, 2024

When building with glibc HEAD, it has fortified headers with clang as well and clang reports errors e.g.

| ../git/src/util/consideredharmful.h:33:7: error: redeclaration of 'strncat' must have the 'overloadable' attribute
| 33 | char* strncat();
| | ^
| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux/taisei/1.4.2/recipe-sysroot/usr/include/bits/string_fortified.h:145:8: note: previous overload of function is here
| 145 | __NTH (strncat (__fortify_clang_overload_arg (char *, __restrict, __dest),
| | ^

kraj added a commit to kraj/taisei that referenced this pull request Nov 22, 2024
When building with glibc HEAD, it has fortified headers with clang as well
and clang reports errors e.g.

| ../git/src/util/consideredharmful.h:33:7: error: redeclaration of 'strncat' must have the 'overloadable' attribute
|    33 | char* strncat();
|       |       ^
| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux/taisei/1.4.2/recipe-sysroot/usr/include/bits/string_fortified.h:145:8: note: previous overload of function is here
|   145 | __NTH (strncat (__fortify_clang_overload_arg (char *, __restrict, __dest),
|       |        ^

Upstream-Status: Submitted [taisei-project#393]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
When building with glibc HEAD, it has fortified headers with clang as well
and clang reports errors e.g.

| ../git/src/util/consideredharmful.h:33:7: error: redeclaration of 'strncat' must have the 'overloadable' attribute
|    33 | char* strncat();
|       |       ^
| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux/taisei/1.4.2/recipe-sysroot/usr/include/bits/string_fortified.h:145:8: note: previous overload of function is here
|   145 | __NTH (strncat (__fortify_clang_overload_arg (char *, __restrict, __dest),
|       |        ^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant