Skip to content

Commit 446ed4a

Browse files
committed
Don't inline popcount
This makes no sense as we need `popcount()` to exist as external symbol. In fact this breaks with C99 compilers which rightfully detect that `popcount` is not used at all, and therefore compile `popc.c` to an essentially empty `popc.o` object... resulting in linker errors on GHC 7.0/7.2 when using such clever compilers...
1 parent bb4fc20 commit 446ed4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cbits/popc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ static char popcount_table_8[256] = {
261261
};
262262
/* Table-driven popcount, with 8-bit tables */
263263
/* 6 ops plus 4 casts and 4 lookups, 0 long immediates, 4 stages */
264-
inline uint32_t
264+
uint32_t
265265
popcount(uint32_t x)
266266
{
267267
return popcount_table_8[(uint8_t)x] +

0 commit comments

Comments
 (0)