Skip to content

tweak source code to compile with clang#52

Open
charmoniumQ wants to merge 1 commit intokuszmaul:masterfrom
charmoniumQ:master
Open

tweak source code to compile with clang#52
charmoniumQ wants to merge 1 commit intokuszmaul:masterfrom
charmoniumQ:master

Conversation

@charmoniumQ
Copy link

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

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
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