Skip to content

Commit f749ab4

Browse files
author
Daniel Kroening
authored
Merge pull request diffblue#3114 from diffblue/c_float_types
float_type(), double_type() and long_double_type() now return float_typet
2 parents fb0d06b + 9a21e27 commit f749ab4

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

src/ansi-c/gcc_types.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ Author: Daniel Kroening, [email protected]
1111
#include <util/config.h>
1212
#include <util/c_types.h>
1313

14-
bitvector_typet gcc_float16_type()
14+
floatbv_typet gcc_float16_type()
1515
{
1616
floatbv_typet result=
1717
ieee_float_spect::half_precision().to_type();
1818
result.set(ID_C_c_type, ID_gcc_float16);
1919
return result;
2020
}
2121

22-
bitvector_typet gcc_float32_type()
22+
floatbv_typet gcc_float32_type()
2323
{
2424
// not same as float!
2525
floatbv_typet result=
@@ -28,7 +28,7 @@ bitvector_typet gcc_float32_type()
2828
return result;
2929
}
3030

31-
bitvector_typet gcc_float32x_type()
31+
floatbv_typet gcc_float32x_type()
3232
{
3333
// not same as float!
3434
floatbv_typet result=
@@ -37,7 +37,7 @@ bitvector_typet gcc_float32x_type()
3737
return result;
3838
}
3939

40-
bitvector_typet gcc_float64_type()
40+
floatbv_typet gcc_float64_type()
4141
{
4242
// not same as double!
4343
floatbv_typet result=
@@ -46,7 +46,7 @@ bitvector_typet gcc_float64_type()
4646
return result;
4747
}
4848

49-
bitvector_typet gcc_float64x_type()
49+
floatbv_typet gcc_float64x_type()
5050
{
5151
// not same as double!
5252
floatbv_typet result=
@@ -55,7 +55,7 @@ bitvector_typet gcc_float64x_type()
5555
return result;
5656
}
5757

58-
bitvector_typet gcc_float128_type()
58+
floatbv_typet gcc_float128_type()
5959
{
6060
// not same as long double!
6161
floatbv_typet result=
@@ -64,7 +64,7 @@ bitvector_typet gcc_float128_type()
6464
return result;
6565
}
6666

67-
bitvector_typet gcc_float128x_type()
67+
floatbv_typet gcc_float128x_type()
6868
{
6969
// not same as long double!
7070
floatbv_typet result=

src/ansi-c/gcc_types.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ Author: Daniel Kroening, [email protected]
1414
// These are gcc-specific; most are not implemented by clang
1515
// https://gcc.gnu.org/onlinedocs/gcc/Floating-Types.html
1616

17-
bitvector_typet gcc_float16_type();
18-
bitvector_typet gcc_float32_type();
19-
bitvector_typet gcc_float32x_type();
20-
bitvector_typet gcc_float64_type();
21-
bitvector_typet gcc_float64x_type();
22-
bitvector_typet gcc_float128_type();
23-
bitvector_typet gcc_float128x_type();
17+
floatbv_typet gcc_float16_type();
18+
floatbv_typet gcc_float32_type();
19+
floatbv_typet gcc_float32x_type();
20+
floatbv_typet gcc_float64_type();
21+
floatbv_typet gcc_float64x_type();
22+
floatbv_typet gcc_float128_type();
23+
floatbv_typet gcc_float128x_type();
2424
unsignedbv_typet gcc_unsigned_int128_type();
2525
signedbv_typet gcc_signed_int128_type();
2626

src/util/c_types.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,23 +182,23 @@ unsignedbv_typet char32_t_type()
182182
return result;
183183
}
184184

185-
bitvector_typet float_type()
185+
floatbv_typet float_type()
186186
{
187187
floatbv_typet result=
188188
ieee_float_spect::single_precision().to_type();
189189
result.set(ID_C_c_type, ID_float);
190190
return result;
191191
}
192192

193-
bitvector_typet double_type()
193+
floatbv_typet double_type()
194194
{
195195
floatbv_typet result=
196196
ieee_float_spect::double_precision().to_type();
197197
result.set(ID_C_c_type, ID_double);
198198
return result;
199199
}
200200

201-
bitvector_typet long_double_type()
201+
floatbv_typet long_double_type()
202202
{
203203
floatbv_typet result;
204204
if(config.ansi_c.long_double_width==128)

src/util/c_types.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ signedbv_typet signed_char_type();
2929
bitvector_typet wchar_t_type();
3030
unsignedbv_typet char16_t_type();
3131
unsignedbv_typet char32_t_type();
32-
bitvector_typet float_type();
33-
bitvector_typet double_type();
34-
bitvector_typet long_double_type();
32+
floatbv_typet float_type();
33+
floatbv_typet double_type();
34+
floatbv_typet long_double_type();
3535
unsignedbv_typet size_type();
3636
signedbv_typet signed_size_type();
3737
signedbv_typet pointer_diff_type();

0 commit comments

Comments
 (0)