Expressions like (uin16_t)a * (uint16_t)b * (uint16_t)c might be promoted to (signed) int (in that example, on platforms where sizeof(int) > sizeof(uint16_t)), and therefore lead to undefined behaviour on overflow. The above expression can be fixed as 1u * (uint16_t)a * (uint16_t)b * (uint16_t)c (The 1u makes sure a, b, and c would be promoted to unsigned int (instead of int) on platforms where sizeof(int) > sizeof(uint16_t)) cf. https://stackoverflow.com/questions/27001604/32-bit-unsigned-multiply-on-64-bit-causing-undefined-behavior
15 lines
683 B
Plaintext
15 lines
683 B
Plaintext
- guf_stack, guf_queue, guf_dqueue, guf_prio_queue (using a heap), guf_ringbuf
|
|
- sort: add cpp #ifdef to remove restrict from declaration
|
|
|
|
- guf_wrapping_mul_TYPE: Not 100 % sure if it does not depend on implementation defined behaviour, but it shouldn't
|
|
|
|
- tests for guf_dict with GUF_DICT_64_BIT_IDX (and also hash32/hash64); maybe pass kv_type to insert to avoid copy
|
|
- dict elems shrink to fit; allow to pass GUF_DBUF_USE_GROWTH_FAC_ONE_POINT_FIVE; start capacity (for elems and kv_indices?)
|
|
- dict: if load factor is high due to mostly tombstones, just try rehashing without resizing first?
|
|
|
|
- bench
|
|
|
|
- no guf_init.h
|
|
|
|
- unicode normalisation
|
|
- handle right-to-left text properly |