@@ -32,7 +32,7 @@ class cpp_convert_typet
3232 double_cnt, float_cnt, complex_cnt, cpp_bool_cnt, proper_bool_cnt,
3333 extern_cnt, noreturn_cnt, wchar_t_cnt, char16_t_cnt, char32_t_cnt,
3434 int8_cnt, int16_cnt, int32_cnt, int64_cnt, ptr32_cnt, ptr64_cnt,
35- float128_cnt, int128_cnt;
35+ float80_cnt, float128_cnt, int128_cnt;
3636
3737 void read (const typet &type);
3838 void write (typet &type);
@@ -55,7 +55,7 @@ void cpp_convert_typet::read(const typet &type)
5555 double_cnt=float_cnt=complex_cnt=cpp_bool_cnt=proper_bool_cnt=
5656 extern_cnt=noreturn_cnt=wchar_t_cnt=char16_t_cnt=char32_t_cnt=
5757 int8_cnt=int16_cnt=int32_cnt=int64_cnt=
58- ptr32_cnt=ptr64_cnt=float128_cnt=int128_cnt=0 ;
58+ ptr32_cnt=ptr64_cnt=float80_cnt= float128_cnt=int128_cnt=0 ;
5959
6060 other.clear ();
6161
@@ -96,6 +96,8 @@ void cpp_convert_typet::read_rec(const typet &type)
9696 double_cnt++;
9797 else if (type.id ()==ID_float)
9898 float_cnt++;
99+ else if (type.id ()==ID_gcc_float80)
100+ float80_cnt++;
99101 else if (type.id ()==ID_gcc_float128)
100102 float128_cnt++;
101103 else if (type.id ()==ID_gcc_int128)
@@ -329,7 +331,7 @@ void cpp_convert_typet::write(typet &type)
329331 short_cnt || char_cnt || wchar_t_cnt ||
330332 char16_t_cnt || char32_t_cnt ||
331333 int8_cnt || int16_cnt || int32_cnt ||
332- int64_cnt || float128_cnt || int128_cnt)
334+ int64_cnt || float80_cnt || float128_cnt || int128_cnt)
333335 throw " type modifier not applicable" ;
334336
335337 if (other.size ()!=1 )
@@ -346,7 +348,7 @@ void cpp_convert_typet::write(typet &type)
346348 float_cnt ||
347349 int8_cnt || int16_cnt || int32_cnt ||
348350 int64_cnt || ptr32_cnt || ptr64_cnt ||
349- float128_cnt || int128_cnt)
351+ float80_cnt || float128_cnt || int128_cnt)
350352 throw " illegal type modifier for double" ;
351353
352354 if (long_cnt)
@@ -361,14 +363,32 @@ void cpp_convert_typet::write(typet &type)
361363 short_cnt || char_cnt || wchar_t_cnt || double_cnt ||
362364 char16_t_cnt || char32_t_cnt ||
363365 int8_cnt || int16_cnt || int32_cnt ||
364- int64_cnt || ptr32_cnt || ptr64_cnt || float128_cnt || int128_cnt)
366+ int64_cnt || ptr32_cnt || ptr64_cnt ||
367+ float80_cnt || float128_cnt || int128_cnt)
365368 throw " illegal type modifier for float" ;
366369
367370 if (long_cnt)
368371 throw " float can't be long" ;
369372
370373 type=float_type ();
371374 }
375+ else if (float80_cnt)
376+ {
377+ if (signed_cnt || unsigned_cnt || int_cnt ||
378+ cpp_bool_cnt || proper_bool_cnt ||
379+ short_cnt || char_cnt || wchar_t_cnt || double_cnt ||
380+ char16_t_cnt || char32_t_cnt ||
381+ int8_cnt || int16_cnt || int32_cnt ||
382+ int64_cnt || int128_cnt || ptr32_cnt || ptr64_cnt ||
383+ float128_cnt)
384+ throw " illegal type modifier for __float80" ;
385+
386+ if (long_cnt)
387+ throw " __float80 can't be long" ;
388+
389+ // this isn't the same as long double
390+ type=gcc_float64x_type ();
391+ }
372392 else if (float128_cnt)
373393 {
374394 if (signed_cnt || unsigned_cnt || int_cnt ||
0 commit comments