Skip to content

Commit fd43215

Browse files
authored
[libc] Fix bugs found when testing with all headers (#144049)
Fixes a couple of bugs found when building. The PR to enable the headers can be found here: #144114. - math.yaml: float128 guard - wchar.yaml: __restrict keyword order
1 parent 493c161 commit fd43215

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

libc/include/math.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ functions:
734734
- type: float128
735735
- type: float128
736736
- type: float128
737-
guards: LIBC_TYPES_HAS_FLOAT128
737+
guard: LIBC_TYPES_HAS_FLOAT128
738738
- name: ffmal
739739
standards:
740740
- stdc

libc/include/wchar.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ functions:
109109
- stdc
110110
return_type: wchar_t *
111111
arguments:
112-
- type: __restrict wchar_t *
113-
- type: const __restrict wchar_t *
112+
- type: wchar_t *__restrict
113+
- type: const wchar_t *__restrict
114114
- type: size_t
115115
- name: wmemmove
116116
standards:
@@ -125,16 +125,16 @@ functions:
125125
- stdc
126126
return_type: wchar_t *
127127
arguments:
128-
- type: __restrict wchar_t *
129-
- type: const __restrict wchar_t *
128+
- type: wchar_t *__restrict
129+
- type: const wchar_t *__restrict
130130
- type: size_t
131131
- name: wcscat
132132
standards:
133133
- stdc
134134
return_type: wchar_t *
135135
arguments:
136-
- type: __restrict wchar_t *
137-
- type: const __restrict wchar_t *
136+
- type: wchar_t *__restrict
137+
- type: const wchar_t *__restrict
138138
- name: wcsstr
139139
standards:
140140
- stdc
@@ -147,13 +147,13 @@ functions:
147147
- stdc
148148
return_type: wchar_t *
149149
arguments:
150-
- type: __restrict wchar_t *
151-
- type: const __restrict wchar_t *
150+
- type: wchar_t *__restrict
151+
- type: const wchar_t *__restrict
152152
- type: size_t
153153
- name: wcscpy
154154
standards:
155155
- stdc
156156
return_type: wchar_t *
157157
arguments:
158-
- type: __restrict wchar_t *
159-
- type: const __restrict wchar_t *
158+
- type: wchar_t *__restrict
159+
- type: const wchar_t *__restrict

libc/test/src/stdio/printf_core/converter_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ TEST_F(LlvmLibcPrintfConverterTest, StringConversionSimple) {
124124
TEST_F(LlvmLibcPrintfConverterTest, StringConversionPrecisionHigh) {
125125
LIBC_NAMESPACE::printf_core::FormatSection high_precision_conv;
126126
high_precision_conv.has_conv = true;
127-
high_precision_conv.raw_string = "%4s";
127+
high_precision_conv.raw_string = "%.4s";
128128
high_precision_conv.conv_name = 's';
129129
high_precision_conv.precision = 4;
130130
high_precision_conv.conv_val_ptr = const_cast<char *>("456");

0 commit comments

Comments
 (0)