Fix -Wattribute-alias warnings in dlmalloc.c#26934
Merged
Merged
Conversation
llvm/llvm-project#195550 added `-Wattribute-alias`, which warns on type mismatches between an alias and its aliased function. This is currently failing on the waterfall: https://ci.chromium.org/ui/p/emscripten-releases/builders/try/linux/b8681947828444624337/overview This fixes the warnings. I'm not sure if we treat this `dlmalloc.c` as a third party code we should not modify, in which case we can consider adding `-Wno-attribute-alias` in `system_libs.py`.
Collaborator
|
We do carry some patches to dlmalloc so if patching is the right thing to do we can do it. Are the mismatches purely about const-ness here? |
Member
Author
|
Those two cases are real mismatches I confirmed. One is not only the constness but the number of |
This is an automatic change generated by tools/maint/rebaseline_tests.py. The following (7) test expectation files were updated by running the tests with `--rebaseline`: ``` codesize/test_codesize_cxx_ctors1.json: 151949 => 151949 [+0 bytes / +0.00%] codesize/test_codesize_cxx_ctors2.json: 151352 => 151352 [+0 bytes / +0.00%] codesize/test_codesize_cxx_except.json: 195817 => 195817 [+0 bytes / +0.00%] codesize/test_codesize_cxx_except_wasm.json: 167044 => 167044 [+0 bytes / +0.00%] codesize/test_codesize_cxx_except_wasm_legacy.json: 164924 => 164924 [+0 bytes / +0.00%] codesize/test_codesize_cxx_mangle.json: 262296 => 262296 [+0 bytes / +0.00%] codesize/test_codesize_cxx_noexcept.json: 153965 => 153965 [+0 bytes / +0.00%] Average change: +0.00% (+0.00% - +0.00%) ```
sbc100
approved these changes
May 13, 2026
sbc100
pushed a commit
that referenced
this pull request
May 13, 2026
This fails for the same reason as #26934. llvm/llvm-project#195550 added `-Wattribute-alias`, which warns on type mismatches between an alias and its aliased function. I ran `./embuilder build ALL` and confirmed there were no more `-Wattribute-alias` errors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
llvm/llvm-project#195550 added
-Wattribute-alias, which warns on type mismatches between an alias and its aliased function. This is currently failing on the waterfall: https://ci.chromium.org/ui/p/emscripten-releases/builders/try/linux/b8681947828444624337/overviewThis fixes the warnings. I'm not sure if we treat this
dlmalloc.cas a third party code we should not modify, in which case we can consider adding-Wno-attribute-aliasinsystem_libs.py.Fixes: #26936