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

add #pragma GCC system_header at jemalloc.h ? #2255

Open
benet96 opened this issue Apr 19, 2022 · 0 comments
Open

add #pragma GCC system_header at jemalloc.h ? #2255

benet96 opened this issue Apr 19, 2022 · 0 comments

Comments

@benet96
Copy link

benet96 commented Apr 19, 2022

We found posix_memalign function has conflict clang header when compiled with clang++ (issue: #1557) and a commit (https://github.com/jemalloc/jemalloc/pull/1558/files) trying to solve it.

The same declaration in stdlib.h can pass the compilation because it has -isystem. If Jemalloc has those function implementation the same as libc, we can add #pragma GCC system_header in jemalloc.h so compiler will consider jemalloc.h as system header even when user include it by ```-I

We think it's a neat patch, I used to remove the posix_memalign from jemalloc.h to resolve the confict, it works because stdlib.h has the same declaration and it will be merged to the declaration in jemalloc.h unless jemalloc.h has no declaration.

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

No branches or pull requests

1 participant