tweak source code to compile with clang#52
Open
charmoniumQ wants to merge 1 commit intokuszmaul:masterfrom
Open
tweak source code to compile with clang#52charmoniumQ wants to merge 1 commit intokuszmaul:masterfrom
charmoniumQ wants to merge 1 commit intokuszmaul:masterfrom
Conversation
Here are the error messages I fixed: error: struct 'static_bin_t' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Werror,-Wmismatched-tags] solution: change "struct" -> "class" ../src/objsizes.cc:292:5 ../src/objsizes.cc:283:5 error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] solution: adding braces is a no-brainer; doesn't change the meaning of code. ../src/large_malloc.cc:22:28 ../src/huge_malloc.cc:13:27 ../src/small_malloc.cc:7:70 error: unknown attribute 'optimize' ignored [-Werror,-Wunknown-attributes] solution: guard the GCC loop-unrolling directive, so that it is only enabled in GCC, and add a clang-guarded loop-unrolling directive ../src/cache.cc:358:16 ../src/cache.cc:370:16 ../src/cache.cc:679:16 ../src/cache.cc:694:16 error: unused variable 'unlock_spin_count' [-Werror,-Wunused-const-variable] solution: comment out ../src/futex_mutex.cc:35:18
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.
Here are the error messages I fixed:
error: struct 'static_bin_t' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Werror,-Wmismatched-tags]
solution: change "struct" -> "class"
../src/objsizes.cc:292:5
../src/objsizes.cc:283:5
error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
solution: adding braces is a no-brainer; doesn't change the meaning of code.
../src/large_malloc.cc:22:28
../src/huge_malloc.cc:13:27
../src/small_malloc.cc:7:70
error: unknown attribute 'optimize' ignored [-Werror,-Wunknown-attributes]
solution: guard the GCC loop-unrolling directive, so that it is only enabled in GCC, and add a clang-guarded loop-unrolling directive
../src/cache.cc:358:16
../src/cache.cc:370:16
../src/cache.cc:679:16
../src/cache.cc:694:16
error: unused variable 'unlock_spin_count' [-Werror,-Wunused-const-variable]
solution: comment out
../src/futex_mutex.cc:35:18