Skip to content

Commit 35b7843

Browse files
author
Michael Flanders
authored
[libc][stdbit][c23] fixes typos in bit_width, bit_floor C type-generic macros (#84659)
Fixes #84658. Assuming these were typos in the first place. I am unsure of the best way to ensure that both sides of the preprocessor condition in `libc/include/llvm-libc-macros/stdbit-macros.h` are tested. Could someone point me in the right direction for adding test coverage to the non `__cplusplus` branch? Or maybe it is being tested and I've missed it.
1 parent d2353ae commit 35b7843

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libc/include/llvm-libc-macros/stdbit-macros.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,14 +274,14 @@ inline unsigned long long stdc_bit_floor(unsigned long long x) {
274274
unsigned long long: stdc_has_single_bit_ull)(x)
275275
#define stdc_bit_width(x) \
276276
_Generic((x), \
277-
unsigned char: stdc_bit_width_ui, \
277+
unsigned char: stdc_bit_width_uc, \
278278
unsigned short: stdc_bit_width_us, \
279279
unsigned: stdc_bit_width_ui, \
280280
unsigned long: stdc_bit_width_ul, \
281281
unsigned long long: stdc_bit_width_ull)(x)
282282
#define stdc_bit_floor(x) \
283283
_Generic((x), \
284-
unsigned char: stdc_bit_floor_ui, \
284+
unsigned char: stdc_bit_floor_uc, \
285285
unsigned short: stdc_bit_floor_us, \
286286
unsigned: stdc_bit_floor_ui, \
287287
unsigned long: stdc_bit_floor_ul, \

0 commit comments

Comments
 (0)