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

5.5.19 doesn't build with clang #155

Closed
nekopsykose opened this issue Oct 14, 2023 · 3 comments
Closed

5.5.19 doesn't build with clang #155

nekopsykose opened this issue Oct 14, 2023 · 3 comments

Comments

@nekopsykose
Copy link

./utils.h:62:7: error: 'malloc' attribute takes no arguments
void *MALLOC_FREE NONNULL do_nofail(void *ptr, const char *file, const int line)
      ^
./utils.h:20:37: note: expanded from macro 'MALLOC_FREE'
# define MALLOC_FREE __attribute__((malloc(free)))
                                    ^
1 error generated.

this is because clang doesn't implement the malloc (deallocator) attribute (ref https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html), just malloc. this was added in f01f8d4 . ref for llvm: llvm/llvm-project#51607 llvm/llvm-project#53152

@rfc1036
Copy link
Owner

rfc1036 commented Oct 14, 2023

Please send a patch.

@marsam
Copy link

marsam commented Oct 14, 2023

I've submitted a patch #156

@rfc1036
Copy link
Owner

rfc1036 commented Nov 5, 2023

I have implemented a slightly different solution.

@rfc1036 rfc1036 closed this as completed Nov 5, 2023
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 a pull request may close this issue.

3 participants